Define a function to call when new data is received
listener = afterEach(queue, funtocall) 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 dispatched immediately to the supplied function.
afterEach | event.listener | parallel.pool.DataQueue | parallel.pool.PollableDataQueue | parfor | poll | send