Currently, Conditions in Miou are a bit different than usual. Internally, we use a pipe() to allow the inter-processs communication. I made a first short about the API where I did not really figure out about details. This PR specify the API and the documentation according to implementation details.
For instance, we should not have spurious wakeups when we actually try to read into our pipe(). However, I kept the same semantic than POSIX condition: if we signal a condition but nobody waits, we do nothing. t02 shows an usual usage of Miou_unix.Cond, we must have a mutex to check a predicate. It's like what the API provides: Miou_unix.Cond.until.
/cc @darrenldl, a fix for #5
Currently, Conditions in Miou are a bit different than usual. Internally, we use a
pipe()
to allow the inter-processs communication. I made a first short about the API where I did not really figure out about details. This PR specify the API and the documentation according to implementation details.For instance, we should not have spurious wakeups when we actually try to read into our
pipe()
. However, I kept the same semantic than POSIX condition: if we signal a condition but nobody waits, we do nothing.t02
shows an usual usage ofMiou_unix.Cond
, we must have a mutex to check a predicate. It's like what the API provides:Miou_unix.Cond.until
.