race
A race condition can occur between competing snippets, like snippets based on the same environment, or snippets that signal a winning strategy but can also stop executing.
Name | Description | Mandatory |
---|---|---|
race start; | Begins a race, passing an arbitrary amount of winners which, by default, is 1 . | Yes |
race stop; | Stops a race. | Yes |
Filter | Result |
---|---|
!# snippet, another, first, second
example.com#$#race start; snippet 1 2 3; other 4 5 6; another 7 8 9; race stop;
example.com#$#race start 2; first 1; second 2; third 3; fourth 4; race stop; | A snippet wins the race, and all others are flagged as losers. A registered callback to stop losing snippets from executing is then invoked. |
Last modified 1mo ago