afterEach
Define a function to call when new data is received on a data queue
Description
specifies a function listener
= afterEach(queue
,funtocall
)funtocall
to execute each time the
queue
receives new data. You can specify multiple different
functions to call, because each call to afterEach
creates a new
listener on the queue. If you want to specify another function, call
afterEach
again. To remove the registration of the function
with the queue
, delete the returned listener
object.
You must call afterEach
in the same process where you created
the data queue, otherwise an error occurs. After calling
afterEach
, any current data in the queue is immediately
passed to the specified function.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2017a
See Also
event.listener
| poll
| parfor
| send
| parallel.pool.DataQueue
| parallel.pool.PollableDataQueue