Skip to main content

Module queue

Module queue 

Source
Expand description

A bounded sample queue that drops the oldest sample. SPEC.md 8.7.

liblsl holds one of these per consumer on the outlet side (src/consumer_queue.h), and one on the inlet side for samples that the application has not pulled yet (src/data_receiver.h:35). Both drop the oldest sample when they fill.

The recorded behavior that this matches is in artifacts/behavior-liblsl.json. A ring of 100 samples, fed 600 samples faster than the reader consumed them, delivered sample 0 and then samples 500 to 599. The writer never waited.

Structsยง

Fanout
A set of consumers that all receive the same sample.
SampleQueue
A queue that never blocks its writer.