nexus.EventQueue
- :
q =nexus.EventQueue()¶ Thread-safe event queue for producer/consumer hand-off.
MATLAB R2026a has no public
nexus.EventQueue; the reference behaviour for this Nexus API is the producer/consumer pattern MATLAB documents withparallel.pool.PollableDataQueue(send/poll) and timer /parfevalcallbacks. This class exposes the backlog namespost/wait:q = nexus.EventQueue; post (q, 42); data = wait (q);
post (q, data)enqueues data (FIFO).data = wait (q)blocks until an item is available.data = wait (q, timeout)waits up to timeout seconds (Inf= forever;0= non-blocking).[data, ok] = wait (__)also returns whether an item was received.Timer callbacks that
postwhile another call is inwaitare delivered becausewaitruns the timer dispatch hook. Workers maypostthrough the same file side-channel used byparallel.pool.DataQueuewhen the queue is passed intoparfeval.