diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2022-12-08 12:53:51 -0800 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2022-12-08 12:53:51 -0800 |
commit | e3b34fec6962e6deda3dd9dd83bf9fa20ab594af (patch) | |
tree | 538111534bd8117f0329c5cf1e586d2007c5989a /indra/llcommon | |
parent | 76c6f3f002693459b77669df39d51fb4e456650d (diff) |
Fix for non-windows build of DRTVWR-559 use usleep() for sleepy_robin scheduler
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/threadpool.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp index b0d2016be0..1b29b8b69f 100644 --- a/indra/llcommon/threadpool.cpp +++ b/indra/llcommon/threadpool.cpp @@ -37,11 +37,17 @@ struct sleepy_robin: public boost::fibers::algo::round_robin { virtual void suspend_until( std::chrono::steady_clock::time_point const&) noexcept { +#if LL_WINDOWS // round_robin holds a std::condition_variable, and // round_robin::suspend_until() calls // std::condition_variable::wait_until(). On Windows, that call seems // busier than it ought to be. Try just sleeping. Sleep(1); +#else + // currently unused other than windows, but might as well have something here + // different units than Sleep(), but we actually just want to sleep for any de-minimis duration + usleep(1); +#endif } virtual void notify() noexcept |