Belle II Software development
|
Public Member Functions | |
def | __init__ (self) |
def | put (self, name, item, **kwargs) |
def | fill_results (self) |
def | get (self, name) |
def | get_keys (self) |
Public Attributes | |
queue | |
The multiprocessing queue to handle. | |
results | |
The results to be filled in the end. | |
This class is a wrapper around a multiprocessing.Queue It can be used to send and receive values from the modules while processing the calculation. You can use it to save - for example - filepaths of outputfiles that you create on the fly. The added items are all of the type CalculationQueueItem. The CalculationQueue can be used as a dict. After the termination of the underlaying process you can access the different entries by their names you gave them when putting them on the queue.
Definition at line 19 of file calculation_queue.py.
def __init__ | ( | self | ) |
Create a queue.
Definition at line 30 of file calculation_queue.py.
def fill_results | ( | self | ) |
Fill the internal dict with the information of the queue. Do not call this on your own. Do only call this when the underlying process has ended.
Definition at line 46 of file calculation_queue.py.
def get | ( | self, | |
name | |||
) |
Return the item with the given name or an Exception when it is not found. Do not call this on your own..
Definition at line 59 of file calculation_queue.py.
def get_keys | ( | self | ) |
Return all possible names of items saved in this queue. Do not call this on your own.
Definition at line 67 of file calculation_queue.py.
def put | ( | self, | |
name, | |||
item, | |||
** | kwargs | ||
) |
Put an item on the queue with the given name. Please keep that adding two items with the same name overrides one of them!
Definition at line 39 of file calculation_queue.py.
queue |
The multiprocessing queue to handle.
Definition at line 35 of file calculation_queue.py.
results |
The results to be filled in the end.
Definition at line 37 of file calculation_queue.py.