1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

LibThreading: Add is_started state information to Thread

Users can now determine whether a thread has been started or not. A
started thread might also have already terminated.

Implementation note: We *could* detect this with pthread APIs maybe, but
this is much simpler.
This commit is contained in:
kleines Filmröllchen 2022-07-13 10:33:14 +02:00 committed by Linus Groh
parent 500dc83f32
commit 91913fba59
2 changed files with 3 additions and 0 deletions

View file

@ -45,6 +45,7 @@ void Threading::Thread::start()
VERIFY(rc == 0);
}
dbgln("Started thread \"{}\", tid = {}", m_thread_name, m_tid);
m_started = true;
}
void Threading::Thread::detach()