<discocaml>
<jumpnbrownweasel> it does have spurious wake-ups, so you need the loop
<discocaml>
<darrenldl> right, only the second version does the loop for you, i see
<companion_cube>
the predicate version?
<discocaml>
<darrenldl> think so, unless i misread again
<discocaml>
<darrenldl> i guess condition variable has always been very bare in semantics to begin with, and i'm just yelling at clouds
<discocaml>
<jumpnbrownweasel> I know the same thing occurs with Java `Object.wait` also, which is where I learned about it originally. And those spurious wakeups really do happen, they caused problems in production when we neglected to recheck the condition.
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
cedb has quit [Ping timeout: 250 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
mima has joined #ocaml
pippijn has quit [Server closed connection]
pippijn has joined #ocaml
pieguy128 has quit [Ping timeout: 255 seconds]
Serpent7776 has joined #ocaml
mima has quit [Ping timeout: 246 seconds]
mima has joined #ocaml
pieguy128 has joined #ocaml
Anarchos has joined #ocaml
<discocaml>
<haesbaert> It's not a lot of work to build the predicate wrapper around a cond though. And if you want really easy sync semantics the way to go is rendezvous (synchronous blocking Sender/Receiver, like go channels).
<discocaml>
<haesbaert> (imho)
Geekingfrog_ is now known as Geekingfrog
bartholin has quit [Quit: Leaving]
rgrinberg has joined #ocaml
<discocaml>
<dinosaure> actually `miou` has a different way to implement condition (as any scheduler projects...). We use a `pipe()` to do the inter-process communication and be able to apply the cancellation if we want.
<discocaml>
<dinosaure> that mostly means that spurious wakeups should not happen when we actually `read` on the `pipe()` (only when `select()` signals to us that the file-descriptor is read)
<discocaml>
<dinosaure> (and, to clarify, I made such choice but it's not a part of the core library 🙂 - we definitely can find something better/smarter about the implementation)
hsw has quit [Remote host closed the connection]
hsw has joined #ocaml
Boarders___ has quit [Read error: Connection reset by peer]
JSharp has quit [Read error: Connection reset by peer]
JSharp has joined #ocaml
Boarders___ has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bartholin has joined #ocaml
waleee has joined #ocaml
infinity0 has quit [Remote host closed the connection]