labProbe

Test to see if messages are ready to be received from other worker

Syntax

isDataAvail = labProbe
isDataAvail = labProbe(srcWkrIdx)
isDataAvail = labProbe('any',tag)
isDataAvail = labProbe(srcWkrIdx,tag)
[isDataAvail,srcWkrIdx,tag] = labProbe

Arguments

srcWkrIdx

labindex of a particular worker from which to test for a message.

tag

Tag defined by the sending worker’s labSend function to identify particular data.

'any'

Character vector to indicate that all workers should be tested for a message.

isDataAvail

Logical indicating if a message is ready to be received.

Description

isDataAvail = labProbe returns a logical value indicating whether any data is available for this worker to receive with the labReceive function.

isDataAvail = labProbe(srcWkrIdx) tests for a message only from the specified worker.

isDataAvail = labProbe('any',tag) tests only for a message with the specified tag, from any worker.

isDataAvail = labProbe(srcWkrIdx,tag) tests for a message from the specified worker and tag.

[isDataAvail,srcWkrIdx,tag] = labProbe returns labindex of the workers and tags of ready messages. If no data is available, srcWkrIdx and tag are returned as [].

Introduced before R2006a

Was this topic helpful?