File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ async def synchronize(self):
432432
433433 """
434434 w = trio .Event ()
435- self ._queue_handle (w )
435+ self ._queue_handle (Handle ( w . set ,(), self , is_sync = True ) )
436436 await w .wait ()
437437
438438 # Signal handling #
@@ -679,20 +679,12 @@ async def _main_loop_one(self, no_wait=False):
679679 # so restart from the beginning.
680680 return
681681
682- if isinstance (obj , trio .Event ):
683- # Events are used for synchronization.
684- # Simply set them.
685- if obj is self ._stopped :
686- raise StopAsyncIteration
687- obj .set ()
688- return
689-
690682 if isinstance (obj , TimerHandle ):
691683 # A TimerHandle is added to the list of timers.
692684 heapq .heappush (self ._timers , obj )
693685 return
694686
695- assert isinstance (obj , asyncio .Handle )
687+ # assert isinstance(obj, asyncio.Handle) # speed-up
696688 # Hopefully one of ours
697689 # but it might be a standard asyncio handle
698690
You can’t perform that action at this time.
0 commit comments