Exemplo n.º 1
0
 def close_hook():
     # Make sure this is a forceful close
     assert trio.current_effective_deadline() == float("-inf")
     record.append("closed")
Exemplo n.º 2
0
 def close_hook():
     # Make sure this is a forceful close
     assert trio.current_effective_deadline() == float("-inf")
     record.append(("closed"))
Exemplo n.º 3
0
 async def run_sync(self, sync_fn: Callable, *args) -> Optional[Outcome]:
     await trio.lowlevel.checkpoint()
     if self.retire is not _special_none_making_retire:
         return capture(lambda *a:
                        (sync_fn, args, trio.current_effective_deadline()))