User | Kudos |
---|---|
6 | |
5 | |
2 | |
2 | |
2 |
This idea is that the Queue and User Event primitives be modified to allow arrays of elements/events to be enqueued/generated at the same time. This is functionally equivalent to just indexing over the array with a for loop, but with one important exception: the enqueue/generation should be atomic, in that all elements/events should enqueued/generated without any intervening elements/events from other threads in the program. So, for example, if one enqueues XYZ while another part of the program enqueues A, the queue will always either be AXYZ or XYZA, but never XAYZ or XYAZ. And if there isn't room in the queue for XYZ, the enqueue will wait until there is room. The idea is to limit the potential for intermittent bugs if the handling of A interferes with the handling of XYZ.
This idea was motivated partly by discussions, by Daklu on LAVA, of flaws in some "QSM" design patterns.
-- James
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.