@@ -256,7 +256,6 @@ cdef class Loop:
256256 self ._queued_streams = set ()
257257 self ._executing_streams = set ()
258258 self ._ready = col_deque()
259- self ._ready_len = 0
260259
261260 self .handler_async = UVAsync.new(
262261 self , < method_t> self ._on_wake, self )
@@ -529,7 +528,7 @@ cdef class Loop:
529528 self .handler_async.send()
530529
531530 cdef _on_wake(self ):
532- if ((self ._ready_len > 0 or self ._stopping) and
531+ if ((len ( self ._ready) > 0 or self ._stopping) and
533532 not self .handler_idle.running):
534533 self .handler_idle.start()
535534
@@ -570,8 +569,7 @@ cdef class Loop:
570569 if len (self ._queued_streams):
571570 self ._exec_queued_writes()
572571
573- self ._ready_len = len (self ._ready)
574- if self ._ready_len == 0 and self .handler_idle.running:
572+ if len (self ._ready) == 0 and self .handler_idle.running:
575573 self .handler_idle.stop()
576574
577575 if self ._stopping:
@@ -659,7 +657,6 @@ cdef class Loop:
659657 for cb_handle in self ._ready:
660658 cb_handle.cancel()
661659 self ._ready.clear()
662- self ._ready_len = 0
663660
664661 if self ._polls:
665662 for poll_handle in self ._polls.values():
@@ -761,7 +758,6 @@ cdef class Loop:
761758 cdef inline _append_ready_handle(self , Handle handle):
762759 self ._check_closed()
763760 self ._ready.append(handle)
764- self ._ready_len += 1
765761
766762 cdef inline _call_soon_handle(self , Handle handle):
767763 self ._append_ready_handle(handle)
0 commit comments