Add a method for blocking threads on ports.

Additionally add the first lock class since we are becoming more
concurrent.
This commit is contained in:
Drew Galbraith 2023-06-12 20:56:25 -07:00
parent b6735d3175
commit 6986f534f8
13 changed files with 88 additions and 14 deletions

View file

@ -13,7 +13,7 @@ class Scheduler {
void Enable() { enabled_ = true; }
Process& CurrentProcess() { return current_thread_->process(); }
Thread& CurrentThread() { return *current_thread_; }
RefPtr<Thread> CurrentThread() { return current_thread_; }
void Enqueue(const RefPtr<Thread>& thread) {
runnable_threads_.PushBack(thread);