Skip to content

Commit

Permalink
README: Start process
Browse files Browse the repository at this point in the history
  • Loading branch information
osnr committed Mar 7, 2024
1 parent f8a3ed6 commit 8d184e2
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,18 +514,15 @@ When when /personVar/ is cool /lambda/ with environment /e/ {
}
```

#### On
#### On and Start

General note: the `On` block is used for weird non-reactive
behavior.

You should _not_ use `When`, `Claim`, or `Wish` directly inside an
`On` block; those only make sense inside a normal reactive context.
FIXME: General note: the `On` and `Start` blocks are used for weird
non-reactive behavior. Need to fill this out more.

##### On process
##### Start process

```
On process A {
Start process A {
while true {
puts "Hello! Another second has passed"
exec sleep 1
Expand All @@ -535,13 +532,18 @@ On process A {

##### On unmatch

You should _not_ use `When`, `Claim`, or `Wish` directly inside an
`On unmatch` block; those only make sense inside a normal reactive
context.

```
set pid [exec python3]
On unmatch {
kill $pid
}
```


#### Non-capturing

You can disable capturing of lexical context around a When with the
Expand Down

0 comments on commit 8d184e2

Please sign in to comment.