Skip to content

Commit

Permalink
Improve fork BBE description
Browse files Browse the repository at this point in the history
  • Loading branch information
prakanth97 committed Apr 18, 2024
1 parent e358f31 commit 9df0ce5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/fork/fork.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fork

The fork statement starts one or more named workers, which run in parallel with each other, each in its own new strand. Variables and parameters in the scope of the fork statement remain within the scope of the workers. Message passing can be done only between the workers created within the fork statement and cannot be done with the function's default worker and its named workers. Unlike named workers outside a `fork` statement, with a `fork` statement, workers can be defined anywhere within the function body (e.g., within a conditional block).
The fork statement starts one or more named workers, which run in parallel with each other, each in its own new strand. Variables and parameters in scope for the fork statement remain in scope within the workers. Message passing can be done only between the workers created within the fork statement and cannot be done with the enclosing function's default worker and its named workers. Unlike named workers outside a fork statement, with a fork statement, workers can be defined anywhere within the function body (e.g., within a conditional block).

::: code fork.bal :::

Expand Down

0 comments on commit 9df0ce5

Please sign in to comment.