Skip to content

Commit 2c0d17e

Browse files
committed
doc(signal,unix): about spawning a thread for signal handler
1 parent 4fd2404 commit 2c0d17e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compio-signal/src/unix.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ impl Drop for SignalFd {
146146

147147
/// Creates a new listener which will receive notifications when the current
148148
/// process receives the specified signal.
149+
///
150+
/// The first call to this method spawns a thread to execute the signal
151+
/// handlers.
149152
pub async fn signal(sig: i32) -> io::Result<()> {
150153
let fd = SignalFd::new(sig)?;
151154
fd.wait().await;

0 commit comments

Comments
 (0)