1

allow vector to be lazy init if alloc not avail

This commit is contained in:
2022-07-24 02:22:43 +02:00
parent a0fd7ea1a4
commit b0b6ec13dc
6 changed files with 54 additions and 41 deletions

View File

@ -45,7 +45,13 @@ private:
void ready(bse::unique_ptr<Thread>&& thread);
public:
Scheduler() : log("SCHED") {}
Scheduler() : log("SCHED"), ready_queue(true), block_queue(true) {} // lazy queues, wait for allocator
// The scheduler has to init the queues explicitly after the allocator is available
void init() {
ready_queue.reserve();
block_queue.reserve();
}
unsigned int get_active() const {
return (*active)->tid;