69 void setJobName (
const String& newName);
97 virtual JobStatus runJob() = 0;
118 void signalJobShouldExit();
141 std::atomic<bool> shouldStop {
false }, isActive {
false }, shouldBeDeleted {
false };
142 ListenerList<Thread::Listener, Array<Thread::Listener*, CriticalSection>> listeners;
144 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ThreadPoolJob)
172 ThreadPool (
int numberOfThreads,
size_t threadStackSize = 0);
225 bool deleteJobWhenFinished);
235 void addJob (std::function<
void()> job);
255 bool interruptIfRunning,
256 int timeOutMilliseconds);
269 bool removeAllJobs (
bool interruptRunningJobs,
270 int timeOutMilliseconds,
274 int getNumJobs() const noexcept;
277 int getNumThreads() const noexcept;
304 int timeOutMilliseconds) const;
309 void moveJobToFront (const
ThreadPoolJob* jobToMove) noexcept;
314 StringArray getNamesOfAllJobs (
bool onlyReturnActiveJobs) const;
320 bool setThreadPriorities (
int newPriority);
337 void createThreads (
int numThreads,
size_t threadStackSize = 0);
342 void removeAllJobs (
bool,
int,
bool);
344 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
ThreadPool)