This commit is contained in:
Nikolay Kim 2025-03-27 20:01:20 +01:00
parent 7cfc07302e
commit b83180347c
2 changed files with 2 additions and 1 deletions

View file

@ -55,7 +55,7 @@ impl<F: ServerConfiguration> ServerManager<F> {
let no_signals = cfg.no_signals;
let shared = Arc::new(ServerShared {
paused: AtomicBool::new(true),
paused: AtomicBool::new(false),
});
let mgr = ServerManager(Rc::new(Inner {
cfg,

View file

@ -40,6 +40,7 @@ impl<T> Server<T> {
/// Send item to worker pool
pub fn process(&self, item: T) -> Result<(), T> {
if self.shared.paused.load(Ordering::Acquire) {
println!("--------- PAUSED");
Err(item)
} else if let Err(e) = self.cmd.try_send(ServerCommand::Item(item)) {
match e.into_inner() {