Make sure Scheduler::GetCurrent() cannot return a nullptr (#2887)

This commit is contained in:
Bart Louwers
2024-10-04 12:47:58 +02:00
committed by GitHub
parent 0ecd218617
commit 4d7d5f50cf
5 changed files with 15 additions and 5 deletions

View File

@@ -80,7 +80,8 @@ public:
virtual void waitForEmpty(const util::SimpleIdentity = util::SimpleIdentity::Empty) = 0;
/// Set/Get the current Scheduler for this thread
static Scheduler* GetCurrent();
/// @param init initialize if missing
static Scheduler* GetCurrent(bool init = true);
static void SetCurrent(Scheduler*);
/// Get the scheduler for asynchronous tasks. This method