Skip to content

Instantly share code, notes, and snippets.

@jonashaag
Last active April 28, 2020 13:46
Show Gist options
  • Save jonashaag/e3181920c28d2c90a0c2eaaa73996ff0 to your computer and use it in GitHub Desktop.
Save jonashaag/e3181920c28d2c90a0c2eaaa73996ff0 to your computer and use it in GitHub Desktop.
if __name__ == '__main__':
import dask.distributed
client = dask.distributed.Client()
queue = dask.distributed.Queue('queue1')
def f():
return 42
def g():
queue
return 42
print(client.gather(client.compute(dask.delayed(f)())))
# => 42
print(client.gather(client.compute(dask.delayed(f))))
# => <function f at 0x7f7ee5eb5730>
print(client.gather(client.compute(dask.delayed(g)())))
# => 42
print(client.gather(client.compute(dask.delayed(g))))
# => infinite hang in gather
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment