summaryrefslogtreecommitdiff
path: root/indra/llcommon/coro_scheduler.cpp
AgeCommit message (Collapse)Author
2024-09-05Fix Windows build errors from develop => release/luau-scripting.Nat Goodspeed
2024-08-28Ditch trailing spaces.Nat Goodspeed
2024-08-06Introduce a custom coroutine/fiber scheduler to prioritize UI.Nat Goodspeed
The viewer's main thread's main fiber is responsible for coordinating just about everything. With the default round_robin fiber scheduling algorithm, launching too many additional fibers could starve the main fiber, resulting in visible lag. This custom scheduler tracks when it switches to and from the main fiber, and at each context switch, how long it's been since the last time the main fiber ran. If that exceeds a certain timeslice, it jumps the main fiber to the head of the queue and resumes that instead of any other ready fiber.