Is Dask distrubuted client thread-safe?

Viewed 289

Can i use distributed Client instance as singleton with multi-threaded environment?

# process start
from dask.distributed import Client
client = Client()
  
# thread-1
f = client.submit(some_work)
f.result()

# thread-2
f = client.submit(anothe_work)
f.result()

What about using async Dask Client with aiohttp? Should I create client instance for each request? Or for IOLoop thread? Or per process will be enough?

1 Answers
Related