summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/threadsafeschedule_test.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-10-04 16:19:59 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-10-04 16:19:59 -0400
commitca60fbe72ce086fbdf0821043ad3be6aad06857c (patch)
tree86f8589528ce721e438a51096735884cbdadb353 /indra/llcommon/tests/threadsafeschedule_test.cpp
parent1b1ebdf183e50c6a751493570ee6e643c33c4eda (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