Ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e0ba6b95ab71a441357ed5484e33498)
cont.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_CONT_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_CONT_H
24#include "ruby/internal/value.h"
26
28
29/* cont.c */
30
31
39VALUE rb_fiber_new(rb_block_call_func_t func, VALUE callback_obj);
40
47VALUE rb_fiber_current(void);
48
58VALUE rb_fiber_alive_p(VALUE fiber);
59
67VALUE rb_obj_is_fiber(VALUE obj);
68
117VALUE rb_fiber_resume(VALUE fiber, int argc, const VALUE *argv);
118
134VALUE rb_fiber_resume_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat);
135
162VALUE rb_fiber_yield(int argc, const VALUE *argv);
163
177VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
178
216VALUE rb_fiber_transfer(VALUE fiber, int argc, const VALUE *argv);
217
233VALUE rb_fiber_transfer_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat);
234
256VALUE rb_fiber_raise(VALUE fiber, int argc, const VALUE *argv);
257
259
260#endif /* RBIMPL_INTERN_CONT_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:106
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:97
VALUE rb_fiber_transfer_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_transfer(), except you can specify how to handle the last element of the given ...
Definition: cont.c:2706
VALUE rb_fiber_raise(VALUE fiber, int argc, const VALUE *argv)
Identical to rb_fiber_resume() but instead of resuming normal execution of the passed fiber,...
Definition: cont.c:2744
VALUE rb_fiber_current(void)
Queries the fiber which is calling this function.
Definition: cont.c:2221
VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_yield(), except you can specify how to handle the last element of the given arr...
Definition: cont.c:2472
VALUE rb_fiber_transfer(VALUE fiber, int argc, const VALUE *argv)
Transfers control to another fiber, resuming it from where it last stopped or starting it if it was n...
Definition: cont.c:2346
VALUE rb_fiber_resume_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_resume(), except you can specify how to handle the last element of the given ar...
Definition: cont.c:2460
VALUE rb_fiber_alive_p(VALUE fiber)
Queries the liveness of the passed fiber.
Definition: cont.c:2500
VALUE rb_fiber_new(rb_block_call_func_t func, VALUE callback_obj)
Creates a Fiber instance from a C-backended block.
Definition: cont.c:1936
VALUE rb_obj_is_fiber(VALUE obj)
Queries if an object is a fiber.
Definition: cont.c:1106
VALUE rb_fiber_yield(int argc, const VALUE *argv)
Yields the control back to the point where the current fiber was resumed.
Definition: cont.c:2478
VALUE rb_fiber_resume(VALUE fiber, int argc, const VALUE *argv)
Resumes the execution of the passed fiber, either from the point at which the last rb_fiber_yield() w...
Definition: cont.c:2466
Block related APIs.
Defines VALUE and ID.