CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
threadobj.cxh
1#include <cx/stype/stvar.h>
2#include <cx/container/sarray.h>
3#include <cx/thread/atomic.h>
4#include <cx/thread/event.h>
5#include <cx/thread/threadbase.h>
6
7[methodprefix _throbj] class Thread {
8 threadFunc entry;
9 string name;
10
11 int exitCode; // only valid once 'running' become false
12
13 stvlist args;
14 [noinit] sarray:stvar _argsa; // should use the stvlist instead where possible
15
16 atomic:bool running;
17 atomic:bool requestExit;
18 [noinit] Event notify;
19
20 init();
21 factory create(threadFunc func, strref name, int n, stvar args[], bool ui);
22}