Skip to content

wait_event

wait_event(queue, condition, proc?): Promise<void>

Defined in: src/wait.ts:55

Sleep until condition holds, i.e. wait_event_interruptible.

A signal ends the wait with EINTR. Linux would return -ERESTARTSYS and restart the call once the handler is done; here the handler runs in userspace when the syscall comes back, so what it sees is the EINTR a syscall with SA_RESTART off would give.

WaitQueue

() => boolean

Process

Promise<void>

EINTR when a signal arrives first