Add TaggedScheduler, couple lifetime of tasks and orchestrator (#2398)

This commit is contained in:
mwilsnd
2024-06-28 17:20:03 -04:00
committed by GitHub
parent b2fe5021b8
commit c4c75452b6
99 changed files with 759 additions and 489 deletions

View File

@@ -31,12 +31,21 @@ public:
class SpriteLoaderTest {
public:
SpriteLoaderTest() = default;
SpriteLoaderTest()
: threadPool(Scheduler::GetBackground(), uniqueID),
spriteLoader(1, threadPool) {}
~SpriteLoaderTest() {
threadPool.waitForEmpty();
threadPool.runRenderJobs(true);
}
util::SimpleIdentity uniqueID;
util::RunLoop loop;
StubFileSource fileSource;
StubSpriteLoaderObserver observer;
SpriteLoader spriteLoader{1};
TaggedScheduler threadPool;
SpriteLoader spriteLoader;
void run() {
// Squelch logging.