summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcond.h
AgeCommit message (Collapse)Author
2024-04-29#824 Process source files in bulk: replace tabs with spaces, convert CRLF to ↵Andrey Lihatskiy
LF, and trim trailing whitespaces as needed
2021-11-24SL-16094: Fix WorkQueue test for correct behavior of runFor().Nat Goodspeed
Turns out that one of our WorkQueue integration tests was relying on the incorrect runFor() behavior that we just fixed, so the test broke. Now that runFor() doesn't wait around for work to be posted, use an explicit wait loop instead. To support this, add LLCond::get(functor), where functor must accept a const reference to the stored data. This new get() returns whatever the functor returns, allowing a caller to peek at the stored data. Also use universal references for all remaining LLCond functor arguments.
2021-10-07SL-16024: Make LLCond::get() lock and return by value.Nat Goodspeed
Its previous behavior, returning a const reference without locking, was wrong: it could return a reference to an object in an inconsistent state if it was concurrently being modified on another thread. Locking the mutex and returning a copy by value is the correct behavior.
2020-05-14DRTVWR-476: Wrap boost::fibers::mutex et al. with LLCoros aliases.Nat Goodspeed
Specifically: LLCoros::Mutex means boost::fibers::mutex LLCoros::LockType means std::unique_lock<boost::fibers::mutex> LLCoros::ConditionVariable means boost::fibers::condition_variable LLCoros::cv_status means boost::fibers::cv_status So as not to drag in all of boost::fibers::mutex.hpp or condition_variable.hpp for each consumer of llcoros.h, instead #define LLCOROS_MUTEX_HEADER and LLCOROS_CONDVAR_HEADER. Those who need them can #include the relevant macro. Update llcond.h and llthreadsafequeue.h accordingly.
2020-03-25DRTVWR-476: Fix first round of compile errors.Nat Goodspeed
2020-03-25DRTVWR-476: Fix convert(F32Milliseconds)Nat Goodspeed
2020-03-25DRTVWR-476: Review response: remove wait_until() methods and LLDate.Nat Goodspeed
2020-03-25DRTVWR-476: Review response: support LLDate and llunits.h durations.Nat Goodspeed
Also introduce value_type typedef.
2020-03-25DRTVWR-476: WIP: Untested preliminary implementation of LLCond.Nat Goodspeed
LLCond encapsulates the usage patterns required to properly use condition_variable. We also provide LLScalarCond, LLBoolCond and LLOneShotCond.