Skip to content

Commit

Permalink
check_interrupt.md: pseudo code
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jul 6, 2023
1 parent 2c0938b commit dd511a3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/check_interrupt.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@ conditions like a trap.

## long-blocking operations

We basically do never actually block for a long period.
Long-blocking operations are emulated with a loop similar
to the following pseudo code:

```c
block_forever()
{
while (1) {
ret = check_interrupt();
if (ret != 0) {
return ret;
}
sleep(short_interval);
}
}
```
### wasm-threads
#### `memory.atomic.wait32` and `memory.atomic.wait64` instructions
Expand Down

0 comments on commit dd511a3

Please sign in to comment.