-
Notifications
You must be signed in to change notification settings - Fork 14
fork
Chung Leong edited this page Jan 10, 2022
·
2 revisions
fork - Split execution of the current function across multiple CPU cores
uint32_t fork(uint32_t $count)
fork() splits the current function into multiple copies and tries to run them concurrently. All local variables are replicated. Each fork will receive a unique fork id, which you can use to identify which part of a given task the fork should work on.
Use [spoon] to merge the copies again.
count - The number of forks to create.
The fork id. It'll number from 0 to count - 1.
2.0 and above.