Skip to content

ActorFuture vs pure Future to submit #7115

Answered by martindurant
YarShev asked this question in Q&A
Discussion options

You must be logged in to vote

In the dask model, futures denote tasks or values that are held in the cluster or due to be run in the cluster, and their results are stateless (i.e., you would get the same if you ran it again, on whichever worker).

Actors sit outside of this model - each is an instance on a specific worker, and maintains internal state. Running methods on an actor uses a completely different code-path, because the communication is directly from the client to the worker, and the scheduler is not involved. This is by design, to give minimum latency and stateful operation - since it's an arbitrary method, calling it twice might give new results. Note that type(future2) is not a normal future.

Your example …

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@jsignell
Comment options

Comment options

You must be logged in to vote
1 reply
@YarShev
Comment options

Answer selected by jsignell
Comment options

You must be logged in to vote
1 reply
@YarShev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants