mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* cont.c: Fiber as SemiCoroutine on default. [ruby-core:12146]
* ext/fiber/fiber.c: enable Fiber#transfer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
94a0db11e7
commit
e826eec433
3 changed files with 11 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Sep 26 19:23:56 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* cont.c: Fiber as SemiCoroutine on default. [ruby-core:12146]
|
||||
|
||||
* ext/fiber/fiber.c: enable Fiber#transfer.
|
||||
|
||||
Wed Sep 26 18:38:41 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* encoding.c (rb_enc_check): check for ASCII-compatibilities.
|
||||
|
|
8
cont.c
8
cont.c
|
@ -732,6 +732,9 @@ Init_Cont(void)
|
|||
rb_cFiber = rb_define_class("Fiber", rb_cObject);
|
||||
rb_undef_alloc_func(rb_cFiber);
|
||||
rb_eFiberError = rb_define_class("FiberError", rb_eStandardError);
|
||||
rb_define_singleton_method(rb_cFiber, "new", rb_fiber_s_new, 0);
|
||||
rb_define_singleton_method(rb_cFiber, "yield", rb_fiber_s_yield, -1);
|
||||
rb_define_method(rb_cFiber, "resume", rb_fiber_m_resume, -1);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -746,12 +749,9 @@ Init_Continuation_body(void)
|
|||
}
|
||||
|
||||
void
|
||||
Init_Fiber_body(void)
|
||||
Init_Fiber_as_Coroutine(void)
|
||||
{
|
||||
rb_define_singleton_method(rb_cFiber, "new", rb_fiber_s_new, 0);
|
||||
rb_define_method(rb_cFiber, "resume", rb_fiber_m_resume, -1);
|
||||
rb_define_method(rb_cFiber, "transfer", rb_fiber_m_transfer, -1);
|
||||
rb_define_method(rb_cFiber, "alive?", rb_fiber_alive_p, 0);
|
||||
rb_define_singleton_method(rb_cFiber, "yield", rb_fiber_s_yield, -1);
|
||||
rb_define_singleton_method(rb_cFiber, "current", rb_fiber_s_current, 0);
|
||||
}
|
||||
|
|
|
@ -4,5 +4,5 @@ void Init_Fiber_body(void);
|
|||
void
|
||||
Init_fiber(void)
|
||||
{
|
||||
Init_Fiber_body();
|
||||
Init_Fiber_as_Coroutine();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue