Retrieve data sent from a worker
poll(pollablequeue)
[data, OK]
= poll(pollablequeue, timeout)
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.
afterEach
| parallel.pool.DataQueue
| parallel.pool.PollableDataQueue
| parfeval
| parfevalOnAll
| parfor
| parpool
| send