Skip to content

Commit 627a5ac

Browse files
authored
Bump fiber scheduler version and add missing documentation. (#13424)
1 parent 64c520f commit 627a5ac

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

include/ruby/fiber/scheduler.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
RBIMPL_SYMBOL_EXPORT_BEGIN()
2525

26-
#define RUBY_FIBER_SCHEDULER_VERSION 2
26+
// Version 3: Adds support for `fiber_interrupt`.
27+
#define RUBY_FIBER_SCHEDULER_VERSION 3
2728

2829
struct timeval;
2930

@@ -418,12 +419,21 @@ VALUE rb_fiber_scheduler_blocking_operation_wait(VALUE scheduler, void* (*functi
418419
*
419420
* This hook may be invoked by a different thread.
420421
*
422+
* @param[in] scheduler Target scheduler.
423+
* @param[in] fiber The fiber to interrupt.
424+
* @param[in] exception The exception to raise in the fiber.
425+
* @return What `scheduler.fiber_interrupt` returns.
421426
*/
422427
VALUE rb_fiber_scheduler_fiber_interrupt(VALUE scheduler, VALUE fiber, VALUE exception);
423428

424429
/**
425430
* Create and schedule a non-blocking fiber.
426431
*
432+
* @param[in] scheduler Target scheduler.
433+
* @param[in] argc Number of arguments in argv.
434+
* @param[in] argv Array of arguments to pass to the fiber.
435+
* @param[in] kw_splat Whether to expand last argument as keywords.
436+
* @return The created and scheduled fiber.
427437
*/
428438
VALUE rb_fiber_scheduler_fiber(VALUE scheduler, int argc, VALUE *argv, int kw_splat);
429439

0 commit comments

Comments
 (0)