manage fiber status (create|running|resumed|terminated)

This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-05-23 15:24:31 +09:00
parent 93d710117d
commit 76ddf86c72
3 changed files with 29 additions and 6 deletions
+8
View File
@@ -61,6 +61,13 @@ typedef struct {
struct REnv *env;
} mrb_callinfo;
enum mrb_fiber_state {
MRB_FIBER_CREATED = 0,
MRB_FIBER_RUNNING,
MRB_FIBER_RESUMED,
MRB_FIBER_TERMINATED,
};
struct mrb_context {
struct mrb_context *prev;
@@ -75,6 +82,7 @@ struct mrb_context {
struct RProc **ensure;
int esize;
uint8_t status;
struct RFiber *fib;
};