Skip to main content

EventBlock

Type Alias EventBlock 

Source
pub type EventBlock = RcBlock<Box<dyn Fn(*mut c_void, u64) + Send>>;
Expand description

Block type: void (^)(id, uint64_t)

Used for SharedEvent notifications: void (^)(MTL::SharedEvent*, uint64_t)

Aliased Type§

pub struct EventBlock { /* private fields */ }

Implementations§

Source§

impl EventBlock

Source

pub fn from_fn<F>(f: F) -> Self
where F: Fn(*mut c_void, u64) + Send + 'static,

Create a block for SharedEvent notifications.

This matches the C++ pattern for event signaling.