Static Public Member Functions | |
| (id< PLActorProcess >) | + spawnWithTarget:selector: |
| Spawn a new actor process. | |
| (id) | + receive |
| Receive a message. | |
| (BOOL) | + receive:withTimeout: |
| Receive a message with the given timeout. | |
| (BOOL) | + receive:usingFilter:filterContext:withTimeout: |
| Perform a selective receive, using the provided filter function to select the first matching queued message. | |
| (PLActorTxId) | + createTransactionId |
| Generate a unique transaction ID; the ID will be unique within the current actor process. | |
| (id< PLActorProcess >) | + process |
| Return your process id. | |
| + (id< PLActorProcess >) spawnWithTarget: | (id) | target | ||
| selector: | (SEL) | selector | ||
Spawn a new actor process.
| target | The object to which the message specified by selector is sent. | |
| selector | The message to send to target. This selector must accept no arguments. |
| + (BOOL) receive: | (id *) | message | ||
| withTimeout: | (PLActorTimeInterval) | timeout | ||
Receive a message with the given timeout.
| message | Received message will be stored in the provided pointer, or set to nil if timeout is was reached. | |
| timeout | Number of milliseconds to wait. If 0, will return immediately. If -1, will wait forever. |
| + (BOOL) receive: | (id *) | message | ||
| usingFilter: | (plactor_receive_filter_t) | filter | ||
| filterContext: | (void *) | filterContext | ||
| withTimeout: | (PLActorTimeInterval) | timeout | ||
Perform a selective receive, using the provided filter function to select the first matching queued message.
| message | Received message will be stored in the provided pointer, or set to nil if timeout is was reached. | |
| filter | Message filter function. | |
| filterContext | Message filter context. | |
| timeout | Number of milliseconds to wait. If 0, will return immediately. If -1, will wait forever. |
| + (PLActorTxId) createTransactionId |
Generate a unique transaction ID; the ID will be unique within the current actor process.
The TXID may be used to differentiate messages, such as RPC requests.
| + (id< PLActorProcess >) process |
Return your process id.
Every actor in the system, including your main thread's run loop, maintains a unique process instance.
1.5.5