parallel.pool.PollableDataQueue
Send and poll data between client and workers
Description
PollableDataQueue
enables synchronous sending and polling for
data or messages between workers and client in a parallel pool while a computation is being
carried out. You can get intermediate values and progress of the computation.
To send data from a parallel pool worker back to the client, first construct a
PollableDataQueue
in the client. Pass this
PollableDataQueue
into a parfor
-loop or other parallel
language construct, such as parfeval
. From the workers, call
send
to send data back to the client. At the client, use
poll
to retrieve the result of a message or data sent from a
worker.
You can call
send
from the worker or client that created thePollableDataQueue
, if required.You can construct the queue on the workers and send it back to the client to enable communication in the reverse direction. However, you cannot send a queue from one worker to another. Use
spmd
,spmdSend
, orspmdReceive
instead.Unlike all other handle objects,
PollableDataQueue
andDataQueue
instances do remain connected when they are sent to workers.
Creation
Description
creates
an object that can be used to send and poll for messages (or data) from different workers.
Create the p
=
parallel.pool.PollableDataQueuePollableDataQueue
on the worker or client where you want to
receive the data.
Properties
Object Functions
Examples
Version History
Introduced in R2017a
See Also
gcp
| poll
| parfor
| send
| parallel.pool.DataQueue
| spmdReceive
| spmdSend
| parfeval
| parfevalOnAll