Example #1
0
 def worker(a, b):
     assert threading.get_ident() != event_loop_thread_id
     return run_sync_from_thread(add, a, b)
Example #2
0
 def thread_func() -> int:
     with pytest.deprecated_call():
         return run_sync_from_thread(threading.get_ident)
Example #3
0
 def thread_worker():
     nonlocal last_active
     run_sync_from_thread(sleep_event.set)
     time.sleep(0.2)
     last_active = 'thread'
     run_sync_from_thread(finish_event.set)