Added getActiveTasks() function to count how many tasks are running or suspended.
This commit is contained in:
@@ -542,6 +542,7 @@ public: // TaskLoop implementation
|
||||
public: // public interface
|
||||
[[nodiscard]] constexpr bool empty() const noexcept { return tasks_.empty() && newTasks_.empty(); }
|
||||
[[nodiscard]] constexpr std::size_t getNumTasks() const noexcept { return tasks_.size() + newTasks_.size(); }
|
||||
[[nodiscard]] std::size_t getActiveTasks() const noexcept;
|
||||
inline CanContinue tick();
|
||||
inline void runUntilDone(IgnoreWaiting ignoreWaiting = IgnoreWaiting::NO);
|
||||
inline void cancelAllTasks() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user