Skip to main content

with_transcript_order

Function with_transcript_order 

Source
pub fn with_transcript_order<T>(block_id: &str, f: impl FnOnce() -> T) -> T
Expand description

Run f holding block_id’s transcript order lock — the lock every append holds from its first write to its publish (see append_transcript). A replace or delete of the block’s transcript, and its announcement (publish_transcript_changed), run inside it, so no append’s write and event can interleave with them and one block’s events stay in order (review of #3636). f must not append to the same block: the lock isn’t reentrant.