nanover.utilities.queues module
- class nanover.utilities.queues.FrameMergingQueue
Bases:
LastItemQueue
SingleItemQueue 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:
object
Mimics the basic interface of a
Queue
but 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
Empty
exception.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()
.