poll
Retrieve data sent from a worker
Description
poll(
retrieves the result
of a message or data sent from a worker to the
pollablequeue
)parallel.pool.PollableDataQueue
specified by
pollablequeue
. You can use poll only in the process where you
created the data queue.
[
returns data
, OK
]
= poll(pollablequeue
, timeout
)data
,
and OK
as a boolean true to indicate that data
has been returned. If there is no data in the queue, then an empty
array is returned with a boolean false for OK
.
Specify timeout
in seconds as an optional second
parameter. In that case, the method might block for the time specified
by timeout
before returning. If any data arrives
in the queue during that period, that data is returned.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2017a
See Also
afterEach
| send
| parfor
| parpool
| parfeval
| parfevalOnAll
| DataQueue
| parallel.pool.PollableDataQueue