summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-10-08 12:00:21 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-10-08 12:00:21 -0400
commitdc972623a9d4d03c726a36baaf840934c1ba6ed0 (patch)
tree240ad89352aada4cb9d5326bff8abee9e314a9d7
parent23ac4bda3dc1f642b50cd7f21b11ed3285cf417f (diff)
parent54d874b1233586844f87e79ae8f211af0a1cb7a6 (diff)
Merge branch 'SL-16024' into DRTVWR-546
-rw-r--r--indra/llcommon/workqueue.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/llcommon/workqueue.h b/indra/llcommon/workqueue.h
index a52f7b0e26..b88aef989a 100644
--- a/indra/llcommon/workqueue.h
+++ b/indra/llcommon/workqueue.h
@@ -104,9 +104,13 @@ namespace LL
* Returns true if able to post, false if the other WorkQueue is
* inaccessible.
*/
- template <typename CALLABLE, typename CALLBACK>
- bool postTo(std::weak_ptr<WorkQueue> target,
- const TimePoint& time, CALLABLE&& callable, CALLBACK&& callback)
+ // Apparently some Microsoft header file defines a macro CALLBACK? The
+ // natural template argument name CALLBACK produces very weird Visual
+ // Studio compile errors that seem utterly unrelated to this source
+ // code.
+ template <typename CALLABLE, typename FOLLOWUP>
+ bool postTo(WorkQueue::weak_t target,
+ const TimePoint& time, CALLABLE&& callable, FOLLOWUP&& callback)
{
// We're being asked to post to the WorkQueue at target.
// target is a weak_ptr: have to lock it to check it.
@@ -170,9 +174,9 @@ namespace LL
* Returns true if able to post, false if the other WorkQueue is
* inaccessible.
*/
- template <typename CALLABLE, typename CALLBACK>
- bool postTo(std::weak_ptr<WorkQueue> target,
- CALLABLE&& callable, CALLBACK&& callback)
+ template <typename CALLABLE, typename FOLLOWUP>
+ bool postTo(WorkQueue::weak_t target,
+ CALLABLE&& callable, FOLLOWUP&& callback)
{
return postTo(target, TimePoint::clock::now(), std::move(callable), std::move(callback));
}
@@ -243,7 +247,7 @@ namespace LL
{
public:
// bind the desired data
- BackJack(std::weak_ptr<WorkQueue> target,
+ BackJack(WorkQueue::weak_t target,
const WorkQueue::TimePoint& start,
const std::chrono::duration<Rep, Period>& interval,
CALLABLE&& callable):
@@ -291,7 +295,7 @@ namespace LL
}
private:
- std::weak_ptr<WorkQueue> mTarget;
+ WorkQueue::weak_t mTarget;
WorkQueue::TimePoint mStart;
std::chrono::duration<Rep, Period> mInterval;
CALLABLE mCallable;