mirror of https://github.com/fafhrd91/actix-net
move pair creator and fix doc spelling
This commit is contained in:
parent
ed987eef06
commit
d73e92b3c6
|
@ -281,8 +281,7 @@ impl ServerWorker {
|
||||||
let (tx2, rx2) = unbounded_channel();
|
let (tx2, rx2) = unbounded_channel();
|
||||||
|
|
||||||
let counter = Counter::new(config.max_concurrent_connections);
|
let counter = Counter::new(config.max_concurrent_connections);
|
||||||
|
let pair = handle_pair(idx, tx1, tx2, counter.clone());
|
||||||
let counter_clone = counter.clone();
|
|
||||||
|
|
||||||
// get actix system context if it is set
|
// get actix system context if it is set
|
||||||
let sys = System::try_current();
|
let sys = System::try_current();
|
||||||
|
@ -345,7 +344,7 @@ impl ServerWorker {
|
||||||
rx,
|
rx,
|
||||||
rx2,
|
rx2,
|
||||||
services,
|
services,
|
||||||
counter: WorkerCounter::new(idx, waker_queue, counter_clone),
|
counter: WorkerCounter::new(idx, waker_queue, counter),
|
||||||
factories: factories.into_boxed_slice(),
|
factories: factories.into_boxed_slice(),
|
||||||
state: Default::default(),
|
state: Default::default(),
|
||||||
shutdown_timeout: config.shutdown_timeout,
|
shutdown_timeout: config.shutdown_timeout,
|
||||||
|
@ -381,7 +380,7 @@ impl ServerWorker {
|
||||||
// wait for service factories initialization
|
// wait for service factories initialization
|
||||||
factory_rx.recv().unwrap();
|
factory_rx.recv().unwrap();
|
||||||
|
|
||||||
Ok(handle_pair(idx, tx1, tx2, counter))
|
Ok(pair)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn restart_service(&mut self, idx: usize, factory_id: usize) {
|
fn restart_service(&mut self, idx: usize, factory_id: usize) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/// An implementation of [`poll_ready`]() that always signals readiness.
|
/// An implementation of [`poll_ready`]() that always signals readiness.
|
||||||
///
|
///
|
||||||
/// This should only be used for basic leaf services that have no concept of un-readiness.
|
/// This should only be used for basic leaf services that have no concept of un-readiness.
|
||||||
/// For wrapper or other serivice types, use [`forward_ready!`] for simple cases or write a bespoke
|
/// For wrapper or other service types, use [`forward_ready!`] for simple cases or write a bespoke
|
||||||
/// `poll_ready` implementation.
|
/// `poll_ready` implementation.
|
||||||
///
|
///
|
||||||
/// [`poll_ready`]: crate::Service::poll_ready
|
/// [`poll_ready`]: crate::Service::poll_ready
|
||||||
|
|
Loading…
Reference in New Issue