[−][src]Crate constellation
Distributed programming primitives.
This library provides a runtime to aide in the writing and debugging of distributed programs.
The two key ideas are:
- Spawning new processes: The
spawn()
function can be used to spawn a new process running a particular closure. - Channels: Senders and Receivers can be used for synchronous or asynchronous inter-process communication.
The only requirement to use is that init()
must be called immediately inside your application's main()
function.
Macros
Fn | Macro that wraps a closure, evaluating to a |
FnMut | Macro that wraps a closure, evaluating to a |
FnOnce | Macro that wraps a closure, evaluating to a |
Structs
Pid | A process identifier. |
Receiver | The receiving half of a channel. |
Resources | Memory and CPU requirements for a process. |
Sender | The sending half of a channel. |
Enums
ChannelError | Channel operation error modes. |
SpawnError | An error returned by the |
TrySpawnError | An error returned by the |
Constants
RESOURCES_DEFAULT | The Resources returned by |
Traits
FutureExt1 | Extension trait to provide convenient |
Functions
init | Initialise the constellation runtime. This must be called immediately inside your application's |
pid | Get the Pid of the current process. |
resources | Get the memory and CPU requirements configured at initialisation of the current process. |
spawn | Spawn a new process. |
try_spawn | Spawn a new process if it can be allocated immediately. |