diff options
Diffstat (limited to 'indra/llcommon/workqueue.h')
-rw-r--r-- | indra/llcommon/workqueue.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llcommon/workqueue.h b/indra/llcommon/workqueue.h index 7dbc735c6d..76d31f32a6 100644 --- a/indra/llcommon/workqueue.h +++ b/indra/llcommon/workqueue.h @@ -123,6 +123,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 --------------------------*/ /** |