Cached process lookups with lunatic.
When a process is lookup, it is cached in the local process to avoid unnecessery future lookups. This is useful for globally registered processes and abstract processes.
```rust use lunatic::{spawnlink, Process}; use lunaticcachedprocess::{cachedprocess, CachedLookup};
cachedprocess! { static COUNTERPROCESS: Process<()> = "counter-process"; }
fn main() { let process = spawnlink!(|mailbox: Mailbox<()>| { loop {} }); process.register("counter-process");
let lookup: Option<Process<()>> = COUNTER_PROCESS.get(); // First call lookup process from host
assert!(lookup.is_some());
let lookup: Option<Process<()>> = COUNTER_PROCESS.get(); // Subsequent calls will use cached process
assert!(lookup.is_some());
} ```
For more examples, see the [examples] directory.
Licensed under either
at your option.