rsimmonsjr / axiom

Implementation of a highly-scalable and ergonomic actor model for Rust
Other
184 stars 21 forks source link

Implement the builder pattern for spawning actors. #87

Closed rsimmonsjr closed 5 years ago

rsimmonsjr commented 5 years ago

Instead of the current system the user should be able to create actors in the following manners:

// Normal vanilla spawn
system.spawn().with(state, processor);
// spawn with a particular name.
system.spawn().name("MyActor").with(state, processor);
// Spawn with a size for the message channel that overrides default.
system.spawn().channel_size(100).with(state, processor);

The current spawn() and spawn_named() would go away in favor of this and examples would show the above for named actors.

rsimmonsjr commented 5 years ago

Implemented.