diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2019-09-11 09:33:07 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2020-03-25 18:44:04 -0400 |
commit | d7c2e4a77bed665d7ab626d9955c35db8c318e95 (patch) | |
tree | 0c044579a3ce66717a18e1dc44f1822e19b3e894 /indra/llcommon/llfixedbuffer.cpp | |
parent | 98cfe13c2a3d5184e3c79043c817611edf49f74d (diff) |
DRTVWR-476: Add Sync class to help with stepwise coroutine tests.
Sync is specifically intended for test programs. It is based on an
LLScalarCond<int>. The idea is that each of two coroutines can watch for the
other to get a chance to run, indicated by incrementing the wrapped int and
notifying the wrapped condition_variable. This is less hand-wavy than calling
llcoro::suspend() and hoping that the other routine will have had a chance to
run.
Use Sync in lleventcoro_test.cpp.
Also refactor lleventcoro_test.cpp so that instead of a collection of static
data requiring a clear() call at start of each individual test function, the
relevant data is all part of the test_data struct common to all test
functions. Make the helper coroutine functions members of test_data too.
Introduce llcoro::logname(), a convenience function to log the name of the
currently executing coroutine or "main" if in the thread's main coroutine.
Diffstat (limited to 'indra/llcommon/llfixedbuffer.cpp')
0 files changed, 0 insertions, 0 deletions