From 905b2ee6fc8ca5b925d9c7f9f5d14ed7f1e4747b Mon Sep 17 00:00:00 2001 From: Doug Binks Date: Fri, 16 Feb 2024 16:24:54 +0000 Subject: [PATCH] Clarified comment --- src/TaskScheduler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TaskScheduler.h b/src/TaskScheduler.h index 3716e0d..2024565 100644 --- a/src/TaskScheduler.h +++ b/src/TaskScheduler.h @@ -316,12 +316,12 @@ namespace enki // while( !GetIsShutdownRequested() ) {} can be used in tasks which loop, to check if enkiTS has been requested to shutdown. // If GetIsShutdownRequested() returns true should then exit. Not required for finite tasks // Safe to use with WaitforAllAndShutdown() and ShutdownNow() where this will be set - // Not safe to use with WaitforAll(). + // Not safe to use with WaitforAll(), use GetIsWaitforAllCalled() instead. inline bool GetIsShutdownRequested() const { return m_bShutdownRequested.load( std::memory_order_acquire ); } // while( !GetIsWaitforAllCalled() ) {} can be used in tasks which loop, to check if WaitforAll() has been called. // If GetIsWaitforAllCalled() returns false should then exit. Not required for finite tasks - // This is intended to be used with code which calls WaitforAll() with flag WAITFORALLFLAGS_INC_WAIT_NEW_PINNED_TASKS set. + // This is intended to be used with code which calls WaitforAll(). // This is also set when the task manager is shutting down, so no need to have an additional check for GetIsShutdownRequested() inline bool GetIsWaitforAllCalled() const { return m_bWaitforAllCalled.load( std::memory_order_acquire ); }