-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcpps_async_loop.h
More file actions
36 lines (32 loc) · 1.02 KB
/
cpps_async_loop.h
File metadata and controls
36 lines (32 loc) · 1.02 KB
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
#ifndef CPPS_ASYNC_LOOP_CPPS_HEAD_
#define CPPS_ASYNC_LOOP_CPPS_HEAD_
//===================================
//@Author : Johnson
//@QQ : 88481106
//@Email : 88481106@qq.com
//@Date : 2020/12/5 (yy/mm/dd)
//@Module : CPPS_ASYNC_LOOP
//@Description : гÌÑ»·
//@website : http://cppscript.org
//==================================
namespace cpps
{
struct cpps_async_loop
{
cpps_async_loop();
virtual ~cpps_async_loop();
void setcstate(C* pc);
void loop(C* c, cpps_async_task* roottask);
void terminate_all_task();
void popemptytask();
bool isrunning();
void push_task(C *c, cpps_value task);
cpps_value run_until_complete(C* c, cpps_value task);
cpps_value create_task(C* c, cpps_async_object* obj, cpps_async_task** outtask);
coroutine::Ordinator *ordinator;
std::vector< cpps_value > _tasks;
C* c;
bool runstate;
};
}
#endif //CPPS_ASYNC_LOOP_CPPS_HEAD_