summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-11-01 19:38:55 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-11-01 19:38:55 +0200
commit3faba7515c757ca3183522bd017c0f76d9c4581c (patch)
tree07fb21fcea3a36d5763fc1ecd0acbb08bdbe74e8 /indra/llcommon
parent2369af6999e65d523ff4db06e7d5fda792153bee (diff)
SL-16237 FIXED Viewer hangs on login
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 --------------------------*/
/**