summaryrefslogtreecommitdiff
path: root/indra/llcommon/indra_constants.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-09-12 10:06:03 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-09-12 10:06:03 -0400
commit24d405048fa0b9b26d1cb1d9e8ea8b113b867a14 (patch)
treec4d41334c00ea443193d201a4d7314e6965acd24 /indra/llcommon/indra_constants.h
parent796085fc537e6bac7999e4b6624f02196eeaf4ad (diff)
DRTVWR-588: Move LLSingleton dependency on LLMainThreadTask to .cpp.
Introduce LLSingletonBase::getInstanceForSecondaryThread(), used both by LLSingleton and LLParamSingleton. Because it's a method of the non-template base class, because it's not itself a template method, getInstanceForSecondaryThread()'s definition can live in llsingleton.cpp. This is what calls LLMainThreadTask::dispatch(). To support LLParamSingleton, though, getInstanceForSecondaryThread() must be capable of handling arguments. For that, it accepts a nullary std::function returning the LLSingletonBase* of interest. Packing initParamSingleton() arguments into a nullary std::function to pass to getInstanceForSecondaryThread() sounds like a job for std::bind(). Unfortunately std::bind() has trouble forwarding int and string literals to a function that infers its argument types. To work around that, use boost::call_traits::param_type and a lambda with an explicit tuple.
Diffstat (limited to 'indra/llcommon/indra_constants.h')
0 files changed, 0 insertions, 0 deletions