summaryrefslogtreecommitdiff
path: root/indra/llcommon/workqueue.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-10-27 15:31:54 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-10-27 15:31:54 -0400
commit8b16ecb9cfb4917fe38e4e5b0e4f40a23dd4ffbf (patch)
treec54bf80ff911f0d8699baeba3c5d2a5cfc519b13 /indra/llcommon/workqueue.h
parentf06765cba868679492934452354d16f9f3af9ade (diff)
SL-16220: Add tests for WorkQueue::waitForResult(), void & non-void.
Diffstat (limited to 'indra/llcommon/workqueue.h')
-rw-r--r--indra/llcommon/workqueue.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/indra/llcommon/workqueue.h b/indra/llcommon/workqueue.h
index 42f5d78ba3..7dbc735c6d 100644
--- a/indra/llcommon/workqueue.h
+++ b/indra/llcommon/workqueue.h
@@ -93,6 +93,25 @@ namespace LL
}
/**
+ * Post work to be run at a specified time to another WorkQueue, which
+ * may or may not still exist and be open. Return true if we were able
+ * to post.
+ */
+ template <typename CALLABLE>
+ static bool postMaybe(weak_t target, const TimePoint& time, CALLABLE&& callable);
+
+ /**
+ * Post work to another WorkQueue, which may or may not still exist
+ * and be open. Return true if we were able to post.
+ */
+ template <typename CALLABLE>
+ static bool postMaybe(weak_t target, CALLABLE&& callable)
+ {
+ return postMaybe(target, TimePoint::clock::now(),
+ std::forward<CALLABLE>(callable));
+ }
+
+ /**
* Launch a callable returning bool that will trigger repeatedly at
* specified interval, until the callable returns false.
*
@@ -137,25 +156,6 @@ namespace LL
}
/**
- * Post work to be run at a specified time to another WorkQueue, which
- * may or may not still exist and be open. Return true if we were able
- * to post.
- */
- template <typename CALLABLE>
- static bool postMaybe(weak_t target, const TimePoint& time, CALLABLE&& callable);
-
- /**
- * Post work to another WorkQueue, which may or may not still exist
- * and be open. Return true if we were able to post.
- */
- template <typename CALLABLE>
- static bool postMaybe(weak_t target, CALLABLE&& callable)
- {
- return postMaybe(target, TimePoint::clock::now(),
- std::forward<CALLABLE>(callable));
- }
-
- /**
* Post work to another WorkQueue to be run at a specified time,
* blocking the calling coroutine until then, returning the result to
* caller on completion.