Commit ed9e99a
authored
wasip3: Perform a thread yield in
This commit updates the `poll` implementation on wasip3 to insert a call
to the canonical `thread.yield` function in the case that there's no
timeout and nothing is ready yet. This explicitly provides the host an
opportunity to deliver events and resolve any potential
otherwise-deadlock if the guest is spinning waiting for events to happen
with a timeout of 0.
This is related to bytecodealliance/wasmtime#13040 and is a partial
guest-side solution for what's outlined there.poll with no timeout (#783)1 parent 5885dd9 commit ed9e99a
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
437 | 445 | | |
438 | 446 | | |
439 | 447 | | |
| |||
0 commit comments