-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcpps_thread.h
More file actions
40 lines (35 loc) · 951 Bytes
/
cpps_thread.h
File metadata and controls
40 lines (35 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef CPPS_THREAD_CPPS_HEAD_
#define CPPS_THREAD_CPPS_HEAD_
//===================================
//@Author : Johnson
//@QQ : 88481106
//@Email : 88481106@qq.com
//@Date : 2018/09/26 (yy/mm/dd)
//@Module : CPPS_THREAD
//@Description : Ïß³ÌÀà
//@website : http://cppscript.org
//==================================
namespace cpps
{
class cpps_thread
{
public:
cpps_thread();
~cpps_thread();
void constructor(C* __parent_thread, object func, object v);
void join();
bool joinable();
bool isdone();
void detach();
void swap(cpps_thread* _swap_thread);
static void _cx_thread_func(cpps_thread* pthis, object func, object v);
void set_return(cpps::object v);
cpps_value get_return();
C* _cx_parent_thread_c;
std::thread *_cx_thread;
cpps_value _ret_Value;
std::atomic<bool> _isdone;
};
void cpps_regthread(C* c);
}
#endif // CPPS_THREAD_CPPS_HEAD_