update actor doc and add more actor based tests

This commit is contained in:
2026-02-17 11:50:46 -06:00
parent 2d054fcf21
commit 2be2b15a61
21 changed files with 268 additions and 51 deletions

View File

@@ -31,7 +31,7 @@ The cancel function, when called, should abort the in-progress work.
```javascript
var fetch_data = function(callback, url) {
$contact(function(connection) {
$send(connection, {get: url}, function(response) {
send(connection, {get: url}, function(response) {
callback(response)
})
}, {host: url, port: 80})
@@ -154,11 +154,11 @@ If the requestor does not complete within the time limit, it is cancelled and th
## Requestors and Actors
Requestors are particularly useful with actor messaging. Since `$send` is callback-based, it fits naturally:
Requestors are particularly useful with actor messaging. Since `send` is callback-based, it fits naturally:
```javascript
var ask_worker = function(callback, task) {
$send(worker, task, function(reply) {
send(worker, task, function(reply) {
callback(reply)
})
}