pub struct CompletionEvent(/* private fields */);Expand description
The ring’s completion event, duplicated for the one that waits on it: the notification the
Windows backend hands out. A type of this crate and not a bare OwnedHandle, because
Waitable is the portable crate’s trait and a handle is the standard library’s, so neither
side could implement one for the other.
One is only made from the ring’s own event, by this crate; no safe constructor takes an arbitrary handle, which could be a mutex the wait would acquire and never release:
use std::os::windows::io::OwnedHandle;
use win_durable_ioring::windows_backend::CompletionEvent;
fn any_handle(handle: OwnedHandle) -> CompletionEvent {
CompletionEvent::new(handle)
}Implementations§
Source§impl CompletionEvent
impl CompletionEvent
Sourcepub fn into_handle(self) -> OwnedHandle
pub fn into_handle(self) -> OwnedHandle
The handle, to wait on by other means.
Trait Implementations§
Source§impl AsHandle for CompletionEvent
impl AsHandle for CompletionEvent
Source§fn as_handle(&self) -> BorrowedHandle<'_>
fn as_handle(&self) -> BorrowedHandle<'_>
Source§impl Debug for CompletionEvent
impl Debug for CompletionEvent
Source§impl Waitable for CompletionEvent
The ring’s completion event is auto-reset (the ring crate’s D-21), so a wait that sees it
signalled consumes the signal, and a raising before the first wait is seen by it: the ring crate
signals the event once as it attaches it (its D-20).
impl Waitable for CompletionEvent
The ring’s completion event is auto-reset (the ring crate’s D-21), so a wait that sees it signalled consumes the signal, and a raising before the first wait is seen by it: the ring crate signals the event once as it attaches it (its D-20).
One waiter per ring is the caller’s to keep, as the ring crate states it: a second wait on the same event, or a duplicate of this handle waited on elsewhere, steals wakes.