nanover.utilities.queues module
- class nanover.utilities.queues.FrameMergingQueue
Bases:
LastItemQueueSingleItemQueue specifically for FrameData items. Put frames will be aggregated with any existing frame so that there is at most one frame in the queue at any time.
- close()
- class nanover.utilities.queues.LastItemQueue
Bases:
objectMimics the basic interface of a
Queuebut only stores one item.- get(block=True, timeout=None)
Get the stored value, and remove it from storage.
If there is no value to get, then the method raises an
Emptyexception.This method is thread-safe and is meant to be a drop in replacement to
Queue.get().- Parameters:
block – Whether to wait until a value is available.
timeout – Timeout for waiting until a value is available.
- Returns:
The stored value.
- put(item, **kwargs)
Store a value, replace the previous one if any.
This method is thread-safe and is meant to be a drop in replacement to
Queue.put().- Parameters:
item – The value to store.
kwargs – Unused arguments for compatibility with
Queue.put().