Age | Commit message (Collapse) | Author |
|
instead of on LLEventTimer.
LLEventTimer takes cycles from the main loop to run through the collection of
pending LLEventTimers, checking each to see if we've reached its timestamp.
But LLMainThreadTask does not require delay timing; it wants the main loop to
service it ASAP. That's what the "mainloop" WorkQueue is for.
But WorkQueue::waitForResult() forbids calls from a thread's default
coroutine. While that restriction may still make sense in general, we
specifically want to be able to pause LLMainThreadTask's caller, no matter
what coroutine it's running on. Introduce WorkQueue::waitForResult_() that
bypasses the check.
|
|
Monty's code review reveals that conflating dispatch() with [un]lock
functionality is inconsistent and unnecessary.
|
|
|
|
If already running on the main thread, LLMaintThreadTask simply runs the work
inline. Otherwise it queues it for the main thread using LLEventTimer, using
std::future to retrieve the result.
|