aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJack Mordaunt <jackmordaunt.dev@gmail.com>2025-06-05 15:38:04 -0300
committerJack Mordaunt <jackmordaunt.dev@gmail.com>2025-06-12 16:14:52 -0300
commitd5b7302ac047dd4c5ee9656d405c84268e27b242 (patch)
tree156c8b53f30274eec77252d6c9e1a441ecb27dd6 /src
parentbe873af003817f7b29ddbd44a4218716d94479dd (diff)
core/sync.try_select_raw: fix TOCTOU
Fixes a TOCTOU where the channel could be used between the call to can_{recv,send} and {recv,send} causing an unexpected blocking operation. To do this we use the non-blocking try_{recv,send} and retry the check in a loop. This guarantees non-blocking select behaviour, at the cost of spinning if the input channels are highly contended. Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions