Skip to main content

Module sync

Module sync 

Source
Expand description

Synchronization mode handoff cross-checks for the Hurray C ABI.

Before consuming a buffer produced by another party, the consumer MUST call the appropriate handoff function to verify that the buffer’s declared SyncMode matches the payload they are providing. This prevents silent race conditions caused by producer/consumer sync-mode disagreement.

See docs/spec/buffer-protocol.md § Synchronization Mode and ADR-018.

Structs§

HurraySyncConsumerStreamPayload
Payload for the ConsumerStream sync mode handoff.
HurraySyncEventPayload
Payload for the Event sync mode handoff.

Functions§

hurray_buffer_handoff_consumer_stream⚠
Validates a ConsumerStream-mode sync handoff from producer to consumer.
hurray_buffer_handoff_event⚠
Validates an Event-mode sync handoff from producer to consumer.
hurray_buffer_handoff_producer_synced⚠
Validates a ProducerSynced-mode sync handoff.

Type Aliases§

HurrayEventReleaseFn
Optional callback invoked to release a sync event handle.