diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2021-10-26 11:49:53 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-10-26 11:49:53 -0400 |
commit | e6eebea8da545350f6684c191c633dd2fbc6f6f1 (patch) | |
tree | ab5885d5a0b65436964b5dbe8ddc9051d1723bac /indra/newview/llvieweroctree.cpp | |
parent | 023d39963e850356e1af6eec7f857e2534ce8d38 (diff) |
SL-16220: Change WorkQueue::runOn() to waitForResult().
In addition to the name making the blocking explicit, we changed the
signature: instead of specifying a target WorkQueue on which to run,
waitForResult() runs the passed callable on its own WorkQueue.
Why is that? Because, unlike postTo(), we do not require a handshake between
two different WorkQueues. postTo() allows running arbitrary callback code,
setting variables or whatever, on the originating WorkQueue (presumably on the
originating thread). waitForResult() synchronizes using Promise/Future, which
are explicitly designed for cross-thread communication. We need not call
set_value() on the originating thread, so we don't need a postTo() callback
lambda.
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
0 files changed, 0 insertions, 0 deletions