Skip to main content

pamoja_event_publisher_new

Function pamoja_event_publisher_new 

Source
#[unsafe(no_mangle)]
pub extern "C" fn pamoja_event_publisher_new( capacity: usize, ) -> *mut PamojaEventPublisher
Expand description

Creates a bus with no subscribers yet, and a publisher on it.

§Arguments

  • capacity - how many events a slow subscriber may fall behind before it starts missing them, rounded up to the next power of two and at most 1048576.

§Returns

A handle the caller must release with pamoja_event_publisher_free.