/// Set a particular set of system components
///
/// This function works just like [system_components](KompactConfig::system_components),
/// except that it assigns the dispatcher to its own thread using
/// [create_dedicated_unsupervised](KompactSystem::create_dedicated_unsupervised).
Set a particular set of system components
This function works just like [system_components](KompactConfig::system_components),
except that it assigns the dispatcher to its own thread using
[create_dedicated_unsupervised](KompactSystem::create_dedicated_unsupervised).
Set a particular set of system components This function works just like [ system_components ] ( KompactConfig :: system_components ) except that it assigns the dispatcher to its own thread using [ create_dedicated_unsupervised ] ( KompactSystem :: create_dedicated_unsupervised ) .
pub fn system_components_with_dedicated_dispatcher<B, C, FB, FC>(
        &mut self,
        deadletter_fn: FB,
        dispatcher_fn: FC,
    ) -> &mut Self
    where
        B: ComponentDefinition + ActorRaw<Message = Never> + Sized + 'static,
        C: ComponentDefinition
            + ActorRaw<Message = DispatchEnvelope>
            + Sized
            + 'static
            + Dispatcher,
        FB: Fn(KPromise<()>) -> B + 'static,
        FC: Fn(KPromise<()>) -> C + 'static,
    {
        let sb = move |system: &KompactSystem, dead_prom: KPromise<()>, disp_prom: KPromise<()>| {
            let deadletter_box = system.create_unsupervised(|| deadletter_fn(dead_prom));
            let dispatcher = system.create_dedicated_unsupervised(|| dispatcher_fn(disp_prom));
            let cc = CustomComponents {
                deadletter_box,
                dispatcher,
            };
            Box::new(cc) as Box<dyn SystemComponents>
        };
        self.sc_builder = Rc::new(sb);
        self
    }
pub fn system_components_with_dedicated_dispatcher < B , C , FB , FC > ( & mut self , deadletter_fn : FB , dispatcher_fn : FC , ) -> & mut Self where B : ComponentDefinition + ActorRaw < Message = Never > + Sized + ' static , C : ComponentDefinition + ActorRaw < Message = DispatchEnvelope > + Sized + ' static + Dispatcher , FB : Fn ( KPromise < ( ) > ) -> B + ' static , FC : Fn ( KPromise < ( ) > ) -> C + ' static , { let sb = move | system : & KompactSystem , dead_prom : KPromise < ( ) > , disp_prom : KPromise < ( ) > | { let deadletter_box = system . create_unsupervised ( | | deadletter_fn ( dead_prom ) ) ; let dispatcher = system . create_dedicated_unsupervised ( | | dispatcher_fn ( disp_prom ) ) ; let cc = CustomComponents { deadletter_box , dispatcher , } ; Box :: new ( cc ) as Box < dyn SystemComponents > } ; self . sc_builder = Rc :: new ( sb ) ; self }
Set a particular set of system components
This function works just like [system_components](KompactConfig::system_components),
except that it assigns the dispatcher to its own thread using
[create_dedicated_unsupervised](KompactSystem::create_dedicated_unsupervised).
Set a particular set of system components This function works just like [ system_components ] ( KompactConfig :: system_components ) except that it assigns the dispatcher to its own thread using [ create_dedicated_unsupervised ] ( KompactSystem :: create_dedicated_unsupervised ) .
&mut self
deadletter_fn
FB
dispatcher_fn
FC