feat: move to async POSIX signal handler
Instead of trying to handle signals for every step of the `cursive` event loop, move the signal handling into its own asynchronous task and send callbacks to `cursive` when a signal arrives.
This commit is contained in:
committed by
Henrik Friedrichsen
parent
209d8e260b
commit
a067ab2ae2
13
Cargo.lock
generated
13
Cargo.lock
generated
@@ -1985,6 +1985,7 @@ dependencies = [
|
||||
"serde_cbor",
|
||||
"serde_json",
|
||||
"signal-hook",
|
||||
"signal-hook-tokio",
|
||||
"strum",
|
||||
"strum_macros",
|
||||
"tokio",
|
||||
@@ -3267,6 +3268,18 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-tokio"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "213241f76fb1e37e27de3b6aa1b068a2c333233b59cca6634f634b80a27ecf1e"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"libc",
|
||||
"signal-hook",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.9"
|
||||
|
||||
Reference in New Issue
Block a user