My Project
Loading...
Searching...
No Matches
libthread.h
Go to the documentation of this file.
1#ifndef _LIBTHREAD_THREADPOOL_H
2#define _LIBTHREAD_THREADPOOL_H
3
4namespace LibThread {
5 class ThreadPool;
6 class Job;
7 // thread pools
8 ThreadPool *createThreadPool(int threads, int prioThreads = 0);
9 void closeThreadPool(ThreadPool *pool, bool wait);
10 ThreadPool *getCurrentThreadPool();
11 // job creation
12 Job *createJob(void (*func)(leftv result, leftv arg));
13 Job *createJob(void (*func)(long ndeps, Job **deps));
14 // job status
15 Job *getCurrentJob();
16 bool getJobCancelled();
17 bool getJobCancelled(Job *job);
18 void addJobArgs(Job *job, leftv arg);
19 void setJobData(Job *job, void *data);
20 void *getJobData(Job *job);
21 leftv getJobResult(Job *job);
22 const char *getJobName();
23 void setJobName(const char *);
24 // Job scheduling
25 Job *startJob(ThreadPool *pool, Job *job, leftv arg);
26 Job *startJob(ThreadPool *pool, Job *job);
27// Job *scheduleJob(ThreadPool *pool, Job *job, long ndeps, Job **deps);
28 void cancelJob(Job *job);
29 void waitJob(Job *job);
30 // reference counting
31 void release(Job *job);
32 void release(ThreadPool *pool);
33 void retain(Job *job);
34 void retain(ThreadPool *pool);
35}
36
37#endif
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
return result
Definition: facAbsBiFact.cc:75
void retain(Job *job)
Job * getCurrentJob()
Definition: shared.cc:2519
bool getJobCancelled()
Definition: shared.cc:2645
Job * startJob(ThreadPool *pool, Job *job, leftv arg)
Definition: shared.cc:2481
ThreadPool * createThreadPool(int threads, int prioThreads=0)
Definition: shared.cc:2218
void setJobData(Job *job, void *data)
Definition: shared.cc:2649
ThreadPool * getCurrentThreadPool()
Definition: shared.cc:2245
void addJobArgs(Job *job, leftv arg)
Definition: shared.cc:2665
void * getJobData(Job *job)
Definition: shared.cc:2657
void closeThreadPool(ThreadPool *pool, bool wait)
Definition: shared.cc:2329
Job * createJob(void(*func)(leftv result, leftv arg))
Definition: shared.cc:2471
void release(Job *job)
const char * getJobName()
void setJobName(const char *)
leftv getJobResult(Job *job)
Definition: shared.cc:2675
void cancelJob(Job *job)
Definition: shared.cc:2514
void waitJob(Job *job)
Definition: shared.cc:2590
wait
Definition: si_signals.h:51