Skip to content

Commit

Permalink
Merge pull request #5346 from prakanth97/fork
Browse files Browse the repository at this point in the history
Improve fork BBE description
  • Loading branch information
MaryamZi authored Apr 18, 2024
2 parents 6237e84 + 9df0ce5 commit aca6aab
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 aca6aab

Please sign in to comment.