Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
Functions
cont.h File Reference

Public APIs related to rb_cFiber. More...

#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
#include "ruby/internal/iterator.h"

Go to the source code of this file.

Functions

VALUE rb_fiber_new (rb_block_call_func_t, VALUE)
 
VALUE rb_fiber_new_kw (rb_block_call_func_t, VALUE, int kw_splat)
 
VALUE rb_fiber_resume (VALUE fib, int argc, const VALUE *argv)
 
VALUE rb_fiber_resume_kw (VALUE fib, int argc, const VALUE *argv, int kw_splat)
 
VALUE rb_fiber_yield (int argc, const VALUE *argv)
 
VALUE rb_fiber_yield_kw (int argc, const VALUE *argv, int kw_splat)
 
VALUE rb_fiber_current (void)
 
VALUE rb_fiber_alive_p (VALUE)
 

Detailed Description

Public APIs related to rb_cFiber.

Author
Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org
Warning
Symbols prefixed with either RBIMPL or rbimpl are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.
Note
To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance __VA_ARGS__ is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file cont.h.

Function Documentation

◆ rb_fiber_alive_p()

VALUE rb_fiber_alive_p ( VALUE  fiber_value)

Definition at line 2455 of file cont.c.

References FIBER_TERMINATED_P, Qfalse, and Qtrue.

Referenced by ruby_Init_Fiber_as_Coroutine().

◆ rb_fiber_current()

VALUE rb_fiber_current ( void  )

Definition at line 2182 of file cont.c.

References rb_fiber_struct::cont, and rb_context_struct::self.

◆ rb_fiber_new()

VALUE rb_fiber_new ( rb_block_call_func_t  func,
VALUE  obj 
)

Definition at line 1902 of file cont.c.

References Qnil, and ruby::backward::cxxanyargs::rb_proc_new().

◆ rb_fiber_new_kw()

VALUE rb_fiber_new_kw ( rb_block_call_func_t  ,
VALUE  ,
int  kw_splat 
)

◆ rb_fiber_resume()

VALUE rb_fiber_resume ( VALUE  fib,
int  argc,
const VALUE argv 
)

Definition at line 2420 of file cont.c.

References argc, argv, rb_fiber_resume_kw(), and RB_NO_KEYWORDS.

◆ rb_fiber_resume_kw()

VALUE rb_fiber_resume_kw ( VALUE  fib,
int  argc,
const VALUE argv,
int  kw_splat 
)

◆ rb_fiber_yield()

VALUE rb_fiber_yield ( int  argc,
const VALUE argv 
)

Definition at line 2432 of file cont.c.

References argc, argv, Qfalse, and RB_NO_KEYWORDS.

◆ rb_fiber_yield_kw()

VALUE rb_fiber_yield_kw ( int  argc,
const VALUE argv,
int  kw_splat 
)

Definition at line 2426 of file cont.c.

References argc, argv, and Qfalse.