get
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Obtains elements in a queue.
Prototype
1 | get(self, block=True, timeout=None) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
block |
Input |
Whether to block the current thread. The default value is True, indicating that the current thread is blocked until the timeout interval expires or an element is obtained. If the value is set to False, the queue.Empty exception will be reported when the queue is empty. |
timeout |
Input |
Block time for dequeuing, in ms. The value range is [0, 2147483647). The default value is None, indicating that the current thread is blocked until an element is obtained. |
Returns
Data object of the corresponding type in MsgType
Exception Handling
If block is set to False or the get operation times out, the queue.Empty exception will be reported.
If redeployment or process exit occurs during dequeuing, the DfAbortException exception will be reported, indicating that the function execution is interrupted.
If the get operation fails, the DfException exception will be reported, indicating that an exception occurs during UDF internal dequeuing.
Constraints
None