Use TLS to store the current thread.

This commit is contained in:
Dr. Chat
2015-12-02 20:11:19 -06:00
committed by Ben Vanik
parent 7e88e54cbe
commit 3678a22c90
2 changed files with 13 additions and 4 deletions

View File

@@ -345,7 +345,7 @@ class Thread : public WaitHandle {
// within that thread.
static std::unique_ptr<Thread> Create(CreationParameters params,
std::function<void()> start_routine);
static std::unique_ptr<Thread> GetCurrentThread();
static Thread* GetCurrentThread();
// Ends the calling thread.
// No destructors are called, and this function does not return.