Future can't be passed to actor method
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
**What happened**:
Future is not materialized in an actor method by Dask machinery.
**What you expected to happen**:
Future is able to be materialized in an actor method by Dask machinery how it is done to submit ordinary functions.
**Minimal Complete Verifiable Example**:
```python
from distributed.client import Client
client = Client()
class Foo:
def __init__(self):
self._accumulator = 0
def foo(self, x):
self._accumulator += x
f1 = client.submit(Foo, actor=True)
actor = f1.result()
f2 = client.scatter(7)
f3 = actor.foo(f2)
TypeError: unsupported operand type(s) for +=: 'int' and 'Future'
```
**Anything else we need to know?**:
Related to #4488.
**Environment**:
- Dask version: 2.19.0
- Python version: Python 3.8.8
- Operating System: Ubuntu 20.04.1 LTS
- Install method (conda, pip, source): pip
Contributor guide
Assessment
This issue has not been assessed yet.