remove global
This commit is contained in:
@@ -62,7 +62,7 @@ An actor is a script that **does not return a value**. It runs as an independent
|
||||
// worker.ce
|
||||
log.console("Worker started")
|
||||
|
||||
$_.on_message = function(msg) {
|
||||
$on_message = function(msg) {
|
||||
log.console("Received:", msg)
|
||||
// Process message...
|
||||
}
|
||||
@@ -86,12 +86,12 @@ Reference to the current actor.
|
||||
log.console($me) // actor reference
|
||||
```
|
||||
|
||||
### $_.stop()
|
||||
### $stop()
|
||||
|
||||
Stop the current actor.
|
||||
|
||||
```javascript
|
||||
$_.stop()
|
||||
$stop()
|
||||
```
|
||||
|
||||
### $send(actor, message, callback)
|
||||
@@ -207,7 +207,7 @@ $start(function(worker) {
|
||||
|
||||
$delay(function() {
|
||||
log.console("Shutting down")
|
||||
$_.stop()
|
||||
$stop()
|
||||
}, 10)
|
||||
```
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Cell is an actor-based scripting language for building concurrent applications.
|
||||
```javascript
|
||||
// hello.ce - A simple actor
|
||||
log.console("Hello, Cell!")
|
||||
$_.stop()
|
||||
$stop()
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user