# Actor

A distributed object that holds state across many calls. Created by applying the distribute decorator to a class rather than a function.

Source: https://university.eugo.io/glossary/actor

---

Tasks are stateless: each call starts fresh. That is the right model until setup is expensive (loading a large model, opening a connection) and you need it across many calls. An actor is placed on a specific node and keeps its state there, so you construct it once and call methods on it repeatedly.

## Related terms

- [Task](https://university.eugo.io/glossary/task) — One unit of distributed work: a single call to a function decorated with the distribute decorator. Tasks are stateless, so each call starts fresh.
- [Future](https://university.eugo.io/glossary/future) — A handle to a result that does not exist yet. Calling a distributed function returns a future immediately, while the work happens elsewhere.
- [distribute decorator](https://university.eugo.io/glossary/distribute-decorator) — The eugo.hpc decorator that turns a function into a distributed task, or a class into an actor. A decorated call returns a future instead of a value.

