Struct romeo::system::System[][src]

pub struct System { /* fields omitted */ }

System is the main handle into a running actor system. It is responsible for creating actors, starting the system (spawning threads and schedulers), stopping the system, etc.

To configure the system, please refer to romeo::system::Config.

Methods

impl System
[src]

Create a new actor in the system and in return get an address to talk to the actor. Note that Romeo tries it's best to keep the actor away from you. Why? Because this ensures that you are not able to manipulate the internal state of the actor directly, but must communicate with it through pure semantics.

Could you manually pass in a channel to your actor instance to bypasss actor-based communication? Sure you could, but then why are you using actors? :-P.

Note: You the system must be running (see spawn) before you can create actors.

Spawns threads and creates schedulers (the runtime) in order to operate the actor system on top of. Before calling this method, ensure all desired configurations have been made via System::with_config. This method will not block the current thread.

Note: This currently does nothing but block on the scheduler threads, which will never exit. This is to-be-implemented.

Trait Implementations

impl Send for System
[src]

As the system is more of a handle to the actor runtime, it should be able to be sent across threads. However, it is not sync to avoid race-conditions in starting/stopping and actor creation, as there is an assumed order. Please look into other primitives, such as a Mutex if you require this behavior.

Auto Trait Implementations

impl !Sync for System