dask / dask/distributed

Actor future can't be passed to submit

Open
#4,488 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

**What happened**:

Actor future can't be passed to submit.

**What you expected to happen**:

It is expected that actor future can be passed to submit with same way as regular future.

**Minimal Complete Verifiable Example**:

```python
from distributed.client import Client
c = Client()
future1 = c.submit(lambda: (1, 2))
futures = [c.submit(lambda l: l[i], future1) for i in range(2)]
futures[0].result()
1
futures[1].result()
2
class Actor:
def foo(self):
return (1, 2)
actor_future = c.submit(Actor, actor=True)
actor = actor_future.result()
future2 = actor.foo()
futures = [c.submit(lambda l: l[i], future2) for i in range(2)]
TypeError: cannot pickle '_thread.lock' object
```

**Anything else we need to know?**:

**Environment**:

- Dask version: 2.19.0
- Python version: Python 3.8.5
- Operating System: both Windows and Linux
- Install method (conda, pip, source): conda

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.