|
Input System
v0.1
|
An InputEventBuffer that can be concurrently written to and read from in FIFO order. More...
An InputEventBuffer that can be concurrently written to and read from in FIFO order.
Event queues have a fixed size. If events are produced faster than they are consumed, new events will start overwriting old events.
Event size is also fixed. While smaller events can be written to the queue, larger events will be rejected.
Memory for event queues is allocated on the native heap and queues can be written to and read from both in C++ and in C#.
Writing to a queue can be done by multiple producers concurrently but only one consumer may read from the queue at a time. Reading events will copy them out into a separate buffer which is not thread-safe and can only be accessed by a single thread at a time. If this is otherwise guaranteed, it is valid for the actual consumer thread to vary over time, though.