pub fn configure(photon: Photon)Expand description
Configure the default Photon instance used by macro-generated convenience helpers
(Type::publish() / Type::subscribe()).
Prefer passing an explicit Photon handle via publish_on / subscribe_on or
Photon::publish. This process-wide shim is optional sugar for simple hosts.
ยงExample
use std::sync::Arc;
use photon_core::JsonIdentityFactory;
use photon_runtime::{configure, Photon};
let photon = Photon::builder().auto_registry().build()?;
photon.start_executor(Arc::new(JsonIdentityFactory))?;
configure(photon);Recovers from a poisoned lock so a prior panicking holder cannot brick configure.