mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
d0a98b549d
commit
cffd2ae409
1 changed files with 10 additions and 12 deletions
|
|
@ -54,21 +54,19 @@ impl Signals {
|
|||
|
||||
let tx = self.tx.clone();
|
||||
Ok(tokio::spawn(async move {
|
||||
loop {
|
||||
while let Some(signal) = signals.next().await {
|
||||
if BLOCKER.try_acquire().is_err() {
|
||||
continue;
|
||||
}
|
||||
while let Some(signal) = signals.next().await {
|
||||
if BLOCKER.try_acquire().is_err() {
|
||||
continue;
|
||||
}
|
||||
|
||||
match signal {
|
||||
SIGHUP | SIGTERM | SIGQUIT | SIGINT => {
|
||||
if tx.send(Event::Quit(Default::default())).is_err() {
|
||||
break;
|
||||
}
|
||||
match signal {
|
||||
SIGHUP | SIGTERM | SIGQUIT | SIGINT => {
|
||||
if tx.send(Event::Quit(Default::default())).is_err() {
|
||||
break;
|
||||
}
|
||||
SIGCONT => Scheduler::app_resume(),
|
||||
_ => {}
|
||||
}
|
||||
SIGCONT => Scheduler::app_resume(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue