diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-05-11 21:21:01 -0700 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-05-11 21:21:01 -0700 |
| commit | ad4118f6ceaf1c22b22d58825924aad5575319f9 (patch) | |
| tree | a1227572853491f2e89fb0db128230c40248b47d /indra/llcommon/workqueue.cpp | |
| parent | 339e02ef3311ad5c1197dfca2955a0c202b7c408 (diff) | |
| parent | 06bdee663433bf5b12eddcbcfcb8785546354c28 (diff) | |
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/llcommon/workqueue.cpp')
| -rw-r--r-- | indra/llcommon/workqueue.cpp | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp index 83e0216ae7..cf80ce0656 100644 --- a/indra/llcommon/workqueue.cpp +++ b/indra/llcommon/workqueue.cpp @@ -161,12 +161,7 @@ bool LL::WorkQueue::done() return mQueue.done(); } -void LL::WorkQueue::post(const Work& callable) -{ - mQueue.push(callable); -} - -bool LL::WorkQueue::postIfOpen(const Work& callable) +bool LL::WorkQueue::post(const Work& callable) { return mQueue.pushIfOpen(callable); } @@ -215,26 +210,16 @@ bool LL::WorkSchedule::done() return mQueue.done(); } -void LL::WorkSchedule::post(const Work& callable) +bool LL::WorkSchedule::post(const Work& callable) { // Use TimePoint::clock::now() instead of TimePoint's representation of // the epoch because this WorkSchedule may contain a mix of past-due // TimedWork items and TimedWork items scheduled for the future. Sift this // new item into the correct place. - post(callable, TimePoint::clock::now()); -} - -void LL::WorkSchedule::post(const Work& callable, const TimePoint& time) -{ - mQueue.push(TimedWork(time, callable)); -} - -bool LL::WorkSchedule::postIfOpen(const Work& callable) -{ - return postIfOpen(callable, TimePoint::clock::now()); + return post(callable, TimePoint::clock::now()); } -bool LL::WorkSchedule::postIfOpen(const Work& callable, const TimePoint& time) +bool LL::WorkSchedule::post(const Work& callable, const TimePoint& time) { return mQueue.pushIfOpen(TimedWork(time, callable)); } |
