Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
vc8f6vVV
· 3y ago · 0 comments
You wait on a shared channel so both read and sleep threads queue a message when ready (whichever comes first). Not sure about channels, but in other languages it would be a concurrent queue.
Comments
[–]
conradludgate
3y ago
This won't cancel the read, it'll just ignore the result
[–]
vc8f6vVV
OP
3y ago
Most languages I know allow killing a thread, or at least unblock a system call.