This module contains all Store like resources.
Stores model the production and consumption of concrete objects. The object type is, by default, not restricted. A single Store can even contain multiple types of objects.
Models the production and consumption of concrete Python objects.
Items put into the store can be of any type. By default, they are put and retrieved from the store in a first-in first-out order.
The env parameter is the Environment instance the container is bound to.
The capacity defines the size of the Store and must be a positive number (> 0). By default, a Store is of unlimited size. A ValueError is raised if the value is negative.
List of the items within the store.
The maximum capacity of the store.
The FilterStore subclasses Store and allows you to only get items that match a user-defined criteria.
Example: The store is empty. Process 1 tries to get an item of type a, Process 2 an item of type b. Another process puts one item of type b into the store. Though Process 2 made his request after Process 1, it will receive that new item because Process 1 doesn’t want it.
Put item into the store if possible or wait until it is.
The item to put into the store.
Get an item from the store or wait until one is available.
Get an item from the store for which filter returns True. This event is triggered once such an event is available.
The default filter function returns True for all items, and thus this event exactly behaves like StoreGet.
The filter function to use.
Get the keyth event from all events that have an item available in the corresponding store’s item queue.
Return True if the queue contains an event for which an item is available in the corresponding store’s item queue.