summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorVir Linden <vir@lindenlab.com>2021-11-09 21:39:47 +0000
committerVir Linden <vir@lindenlab.com>2021-11-09 21:39:47 +0000
commit4d0010d1fcb22ce0672d2667d73f5a612c600e14 (patch)
tree66e2029a1eb2d82c2c21a39e9772c42319f7a155 /indra/llcommon
parentca0b9a3753fa3b42d4ac8183adcf30d957f55016 (diff)
parent768b7a4d33b64dc3e9d7f7c0c384bb2aa37b458b (diff)
Merged DRTVWR-546 into SL-16329
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/workqueue.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llcommon/workqueue.h b/indra/llcommon/workqueue.h
index b88aef989a..5ec790da79 100644
--- a/indra/llcommon/workqueue.h
+++ b/indra/llcommon/workqueue.h
@@ -94,6 +94,12 @@ namespace LL
void postEvery(const std::chrono::duration<Rep, Period>& interval,
CALLABLE&& callable);
+ template <typename CALLABLE>
+ bool tryPost(CALLABLE&& callable)
+ {
+ return mQueue.tryPush(TimedWork(TimePoint::clock::now(), std::move(callable)));
+ }
+
/*------------------------- handshake API --------------------------*/
/**