summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
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 --------------------------*/
/**