summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-01 00:48:08 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-01 00:48:08 +0900
commit2c7204fc937dc2ae6a8c2de75f508791c30f1de9 (patch)
tree9f6c7dd938d0d8fd1e441edeac51fd2a4c1c9d62 /include/mruby.h
parent1f134d723c632cdd51c08e16ab0f170845a73756 (diff)
downloadmruby-2c7204fc937dc2ae6a8c2de75f508791c30f1de9.tar.gz
mruby-2c7204fc937dc2ae6a8c2de75f508791c30f1de9.zip
mrb_fiber_yield() is available now; you have to link mruby-fiber mrbgem to use the function; there's no function available to create new fiber from C (countapart of Lua's lua_newthread), but that's because you cannot create a new fiber from C due to mruby C API design limitation. define your method to create fibers in Ruby; close #1269
Diffstat (limited to 'include/mruby.h')
-rw-r--r--include/mruby.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 30c2dbbb1..4f404fb8e 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -374,6 +374,9 @@ mrb_value mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id);
mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid);
mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c);
+/* fiber functions (you need to link mruby-fiber mrbgem to use) */
+mrb_value mrb_fiber_yield(mrb_state *mrb, int argc, mrb_value *argv);
+
/* memory pool implementation */
typedef struct mrb_pool mrb_pool;
struct mrb_pool* mrb_pool_open(mrb_state*);