mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-04 21:37:58 +03:00
wip
This commit is contained in:
parent
7cfc07302e
commit
b83180347c
2 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,7 @@ impl<F: ServerConfiguration> ServerManager<F> {
|
||||||
|
|
||||||
let no_signals = cfg.no_signals;
|
let no_signals = cfg.no_signals;
|
||||||
let shared = Arc::new(ServerShared {
|
let shared = Arc::new(ServerShared {
|
||||||
paused: AtomicBool::new(true),
|
paused: AtomicBool::new(false),
|
||||||
});
|
});
|
||||||
let mgr = ServerManager(Rc::new(Inner {
|
let mgr = ServerManager(Rc::new(Inner {
|
||||||
cfg,
|
cfg,
|
||||||
|
|
|
@ -40,6 +40,7 @@ impl<T> Server<T> {
|
||||||
/// Send item to worker pool
|
/// Send item to worker pool
|
||||||
pub fn process(&self, item: T) -> Result<(), T> {
|
pub fn process(&self, item: T) -> Result<(), T> {
|
||||||
if self.shared.paused.load(Ordering::Acquire) {
|
if self.shared.paused.load(Ordering::Acquire) {
|
||||||
|
println!("--------- PAUSED");
|
||||||
Err(item)
|
Err(item)
|
||||||
} else if let Err(e) = self.cmd.try_send(ServerCommand::Item(item)) {
|
} else if let Err(e) = self.cmd.try_send(ServerCommand::Item(item)) {
|
||||||
match e.into_inner() {
|
match e.into_inner() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue