Lines Matching refs:ThreadPoolJob

40     std::atomic<ThreadPoolJob*> currentJob { nullptr };
47 ThreadPoolJob::ThreadPoolJob (const String& name) : jobName (name) in ThreadPoolJob() function in juce::ThreadPoolJob
51 ThreadPoolJob::~ThreadPoolJob() in ~ThreadPoolJob()
58 String ThreadPoolJob::getJobName() const in getJobName()
63 void ThreadPoolJob::setJobName (const String& newName) in setJobName()
68 void ThreadPoolJob::signalJobShouldExit() in signalJobShouldExit()
74 void ThreadPoolJob::addListener (Thread::Listener* listener) in addListener()
79 void ThreadPoolJob::removeListener (Thread::Listener* listener) in removeListener()
84 ThreadPoolJob* ThreadPoolJob::getCurrentThreadPoolJob() in getCurrentThreadPoolJob()
129 void ThreadPool::addJob (ThreadPoolJob* job, bool deleteJobWhenFinished) in addJob()
151 void ThreadPool::addJob (std::function<ThreadPoolJob::JobStatus()> jobToRun) in addJob()
153 struct LambdaJobWrapper : public ThreadPoolJob in addJob()
155 …LambdaJobWrapper (std::function<ThreadPoolJob::JobStatus()> j) : ThreadPoolJob ("lambda"), job (j)… in addJob()
158 std::function<ThreadPoolJob::JobStatus()> job; in addJob()
166 struct LambdaJobWrapper : public ThreadPoolJob in addJob()
168 LambdaJobWrapper (std::function<void()> j) : ThreadPoolJob ("lambda"), job (j) {} in addJob()
169 JobStatus runJob() override { job(); return ThreadPoolJob::jobHasFinished; } in addJob()
188 ThreadPoolJob* ThreadPool::getJob (int index) const noexcept in getJob()
194 bool ThreadPool::contains (const ThreadPoolJob* job) const noexcept in contains()
197 return jobs.contains (const_cast<ThreadPoolJob*> (job)); in contains()
200 bool ThreadPool::isJobRunning (const ThreadPoolJob* job) const noexcept in isJobRunning()
203 return jobs.contains (const_cast<ThreadPoolJob*> (job)) && job->isActive; in isJobRunning()
206 void ThreadPool::moveJobToFront (const ThreadPoolJob* job) noexcept in moveJobToFront()
210 auto index = jobs.indexOf (const_cast<ThreadPoolJob*> (job)); in moveJobToFront()
216 bool ThreadPool::waitForJobToFinish (const ThreadPoolJob* job, int timeOutMs) const in waitForJobToFinish()
234 bool ThreadPool::removeJob (ThreadPoolJob* job, bool interruptIfRunning, int timeOutMs) in removeJob()
237 OwnedArray<ThreadPoolJob> deletionList; in removeJob()
266 Array<ThreadPoolJob*> jobsToWaitFor; in removeAllJobs()
269 OwnedArray<ThreadPoolJob> deletionList; in removeAllJobs()
344 ThreadPoolJob* ThreadPool::pickNextJobToRun() in pickNextJobToRun()
346 OwnedArray<ThreadPoolJob> deletionList; in pickNextJobToRun()
379 auto result = ThreadPoolJob::jobHasFinished; in runNextJob()
393 OwnedArray<ThreadPoolJob> deletionList; in runNextJob()
402 if (result != ThreadPoolJob::jobNeedsRunningAgain || job->shouldStop) in runNextJob()
423 void ThreadPool::addToDeleteList (OwnedArray<ThreadPoolJob>& deletionList, ThreadPoolJob* job) const in addToDeleteList()