pub struct EventPair { /* private fields */ }Expand description
Lightweight cross-process event signalling.
Unix: two independent pipes provide bidirectional wake-up. Windows: two named auto-reset events provide bidirectional wake-up.
Implementations§
Source§impl EventPair
impl EventPair
Sourcepub unsafe fn from_fds(
daw_to_host_read: i32,
host_to_daw_write: i32,
) -> EventPair
pub unsafe fn from_fds( daw_to_host_read: i32, host_to_daw_write: i32, ) -> EventPair
§Safety
daw_to_host_read and host_to_daw_write must be valid,
already-open file descriptors inherited from the parent process.
pub fn daw_write_fd(&self) -> i32
pub fn daw_read_fd(&self) -> i32
pub fn host_read_fd(&self) -> i32
pub fn host_write_fd(&self) -> i32
Sourcepub fn signal_host(&self) -> Result<(), Error>
pub fn signal_host(&self) -> Result<(), Error>
DAW wakes the host.
Sourcepub fn wait_host(&self, timeout: Duration) -> Result<(), Error>
pub fn wait_host(&self, timeout: Duration) -> Result<(), Error>
DAW waits for host completion (with timeout).
Sourcepub fn wait_daw(&self, timeout: Duration) -> Result<(), Error>
pub fn wait_daw(&self, timeout: Duration) -> Result<(), Error>
Host waits for DAW wake (with timeout).
Sourcepub fn signal_daw(&self) -> Result<(), Error>
pub fn signal_daw(&self) -> Result<(), Error>
Host signals completion to DAW.
Sourcepub fn close_daw_unused(&mut self)
pub fn close_daw_unused(&mut self)
Close the file descriptors that the DAW side does not need.
Sourcepub fn close_host_unused(&mut self)
pub fn close_host_unused(&mut self)
Close the file descriptors that the host side does not need.
Trait Implementations§
impl Send for EventPair
impl Sync for EventPair
Auto Trait Implementations§
impl Freeze for EventPair
impl RefUnwindSafe for EventPair
impl Unpin for EventPair
impl UnsafeUnpin for EventPair
impl UnwindSafe for EventPair
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more