robur-coop / miou

A simple scheduler for OCaml 5
https://docs.osau.re/miou/index.html
MIT License
93 stars 7 forks source link

Make the interdomain pipe non-blocking #25

Closed haesbaert closed 4 months ago

haesbaert commented 5 months ago

Heya, the fix in 29cb3d00d40bbfdffbd30fad84f886a9e0a33e7b is odd.

You can just make the pipe non-blocking, and if write returns EAGAIN, you ignore (there's pending stuff), you don't need the interrupted thing at all.

Just a suggestion, unless I missed something.

dinosaure commented 5 months ago

the pipe non-blocking, and if write returns EAGAIN

Ah yes, it can save an atomic and delay everything to the system, I will try to propose something soon. Thanks for your report :+1:.