HomeFreeBSD

Allow timed waits with relative timeouts on locks and condvars.

Description

Allow timed waits with relative timeouts on locks and condvars.

Even though pthreads doesn't support this, there are various alternative
APIs that use this. For example, uv_cond_timedwait() accepts a relative
timeout. So does Rust's std::sync::Condvar::wait_timeout().

Though I personally think that relative timeouts are bad (due to
imprecision for repeated operations), it does seem that people want
this. Extend the existing futex functions to keep track of whether an
absolute timeout is used in a boolean flag.

MFC after: 1 month

Details

Provenance
edAuthored on
Parents
rS327559: Disabled the use of flowid for lagg by default
Branches
Unknown
Tags
Unknown