Advertisement
Guest User

Untitled

a guest
Dec 13th, 2021
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # run numpy.save( path, data ) on the default thread pool
  2. save_done = asyncio.get_running_loop().run_in_executor( None, numpy.save, path, data )
  3. # save_done is an awaitable (for determining completion and gettting the return value or exception thrown)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement