pub(crate) fn build<W, M>(rt: &Runtime, worker: W, ctx: Context) -> Sender<RelayMessage>
where
    W: Worker<Context = Context, Message = M>,
    M: Message + Send + 'static,
{
    let (tx, rx) = channel(32);
    let relay = Relay::<W, M>::new(rx, worker, ctx);
    rt.spawn(relay.run());
    tx
}
/// Build and spawn a new worker relay, returning a send handle to it
Build and spawn a new worker relay, returning a send handle to it
Build and spawn a new worker relay returning a send handle to it
pub(crate) fn build<W, M>(rt: &Runtime, worker: W, ctx: Context) -> Sender<RelayMessage>
where
    W: Worker<Context = Context, Message = M>,
    M: Message + Send + 'static,
{
    let (tx, rx) = channel(32);
    let relay = Relay::<W, M>::new(rx, worker, ctx);
    rt.spawn(relay.run());
    tx
}
pub ( crate ) fn build < W , M > ( rt : & Runtime , worker : W , ctx : Context ) -> Sender < RelayMessage > where W : Worker < Context = Context , Message = M > , M : Message + Send + ' static , { let ( tx , rx ) = channel ( 32 ) ; let relay = Relay :: < W , M > :: new ( rx , worker , ctx ) ; rt . spawn ( relay . run ( ) ) ; tx }
Build and spawn a new worker relay, returning a send handle to it
Build and spawn a new worker relay returning a send handle to it
rt
&Runtime
worker
W
ctx
Context
rt
&Runtime
worker
W
ctx
Context