diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2021-05-17 13:37:13 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-05-17 13:37:13 -0400 |
commit | d313d7021ff551f2a5ef7ec54ff2b3234d96017b (patch) | |
tree | f53604298727a1136ffc5800a65c8cea50706dff /indra/llplugin/llpluginprocesschild.cpp | |
parent | 87faf258911f5d23416500ff632050ce05b30e3e (diff) |
SL-15200: Add LLApp::sleep(duration) methods.
Two sleep() methods: one accepting F32Milliseconds, or in general any LLUnits
time class; the other accepting any std::chrono::duration.
The significant thing about each of these sleep() methods, as opposed to any
freestanding sleep() function, is that it only sleeps until the app starts
shutdown. Moreover, it returns true if it slept for the whole specified
duration, false if it woke for app shutdown.
This is accomplished by making LLApp::sStatus be an LLScalarCond<EAppStatus>
instead of a plain EAppStatus enum, and by making setStatus() call set_all()
each time the value changes. Then each new sleep() method can call
wait_for_unequal(duration, APP_STATUS_RUNNING).
Introducing llcond.h into llapp.h triggered an #include circularity because
llthread.h #included llapp.h even though it didn't reference anything from it.
Removed. This, in turn, necessitated adding #include "llapp.h" to several .cpp
files that reference LLApp but had been depending on other header files to
drag in llapp.h.
Diffstat (limited to 'indra/llplugin/llpluginprocesschild.cpp')
0 files changed, 0 insertions, 0 deletions