News for hackers. Stuff that matters.
Re:You might want async in your project by conradludgate on Monday September 11, 2023 @05:20AM (#37464738)
You either wait on the channel or wait on a read. How do you manage both?
Re:You might want async in your project by vc8f6vVV on Monday September 11, 2023 @05:48PM (#37474178)
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.
Re:You might want async in your project by conradludgate on Monday September 11, 2023 @10:05PM (#37476234)
This won't cancel the read, it'll just ignore the result
Re:You might want async in your project by vc8f6vVV on Tuesday September 12, 2023 @12:36PM (#37483867)
Most languages I know allow killing a thread, or at least unblock a system call.