diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2021-10-04 16:19:59 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-10-04 16:19:59 -0400 |
commit | ca60fbe72ce086fbdf0821043ad3be6aad06857c (patch) | |
tree | 86f8589528ce721e438a51096735884cbdadb353 /indra/llcommon/tests/threadsafeschedule_test.cpp | |
parent | 1b1ebdf183e50c6a751493570ee6e643c33c4eda (diff) |
SL-16024: LLThreadSafeQueue enhancements
Add LL::PriorityQueueAdapter, a wrapper for std::priority_queue to make its
API more closely resemble std::queue for drop-in use as LLThreadSafeQueue's
underlying QueueT container.
Support move-only element types.
Factor out some implementation redundancy: wrap actual push semantics as
push_(), actual pop semantics as pop_(). push(), tryPush() and tryPushUntil()
now call push_(); pop(), tryPop() and tryPopUntil() now call pop_().
Break out tryLock() and tryLockUntil() methods that, if they can lock, run the
passed callable. Then tryPush(), tryPushUntil(), tryPop() and tryPopUntil()
pass lambdas containing the meat of the original method body to tryLock() or
tryLockUntil(), as appropriate.
Diffstat (limited to 'indra/llcommon/tests/threadsafeschedule_test.cpp')
0 files changed, 0 insertions, 0 deletions