Skip to content

Commit

Permalink
Remove len
Browse files Browse the repository at this point in the history
  • Loading branch information
okuta committed Jun 19, 2017
1 parent 5e2a7ff commit 63271b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cupy/cuda/pinned_memory.pyx
Expand Up @@ -158,13 +158,13 @@ cdef class _EventWatcher:
""" Check and release completed events.
"""
if len(self.events) == 0:
if not self.events:
return
with self.lock:
self._check_and_release_without_lock()

cpdef _check_and_release_without_lock(self):
while len(self.events) != 0 and self.events[0][0].done:
while self.events and self.events[0][0].done:
del self.events[0]


Expand Down

0 comments on commit 63271b5

Please sign in to comment.