Skip to content

Commit

Permalink
Clarified comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbinks committed Feb 16, 2024
1 parent 7845f41 commit 905b2ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TaskScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ); }

Expand Down

0 comments on commit 905b2ee

Please sign in to comment.