Rudiments

- Main Page
- Classes

thread.h
1 // Copyright (c) 2013 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_THREAD_H
5 #define RUDIMENTS_THREAD_H
6
7 #include <rudiments/private/threadincludes.h>
8
9 class threadprivate;
10
12 class RUDIMENTS_DLLSPEC thread {
13 public:
15 thread();
16
18 virtual ~thread();
19
22 void setFunction(void *(*function)(void *));
23
26 void setArgument(void *arg);
27
30 bool setStackSize(size_t stacksize);
31
34 bool getStackSize(size_t *stacksize);
35
40 bool run();
41
46 bool run(void *arg);
47
53 bool runDetached();
54
59 bool runDetached(void *arg);
60
66 void exit(int32_t *status);
67
73 bool join(int32_t *status);
74
78 bool detach();
79
81 bool raiseSignal(int32_t signum);
82
85 static bool supportsThreads();
86
92 void retryFailedRun();
93
98 void dontRetryFailedRun();
99
102 bool getRetryFailedRun();
103
104 #include <rudiments/private/thread.h>
105 };
106
107 #endif
thread
Definition: thread.h:12