diff options
Diffstat (limited to 'src/rt/sync/sync.h')
| -rw-r--r-- | src/rt/sync/sync.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/rt/sync/sync.h b/src/rt/sync/sync.h index 8c9a13f0..562d2a1b 100644 --- a/src/rt/sync/sync.h +++ b/src/rt/sync/sync.h @@ -11,4 +11,25 @@ public: } }; +/** + * Thread utility class. Derive and implement your own run() method. + */ +class rust_thread { +public: +#if defined(__WIN32__) + HANDLE thread; +#else + pthread_t thread; +#endif + void start(); + + virtual void run() { + return; + } + + void join(); + + bool is_running(); +}; + #endif /* SYNC_H */ |