@@ -1499,6 +1499,13 @@ ractor_selector_create(VALUE klass)
14991499
15001500// Ractor::Selector#add(r)
15011501
1502+ /*
1503+ * call-seq:
1504+ * add(ractor) -> ractor
1505+ *
1506+ * Adds _ractor_ to +self+. Raises an exception if _ractor_ is already added.
1507+ * Returns _ractor_.
1508+ */
15021509static VALUE
15031510ractor_selector_add (VALUE selv , VALUE rv )
15041511{
@@ -1527,6 +1534,12 @@ ractor_selector_add(VALUE selv, VALUE rv)
15271534
15281535// Ractor::Selector#remove(r)
15291536
1537+ /* call-seq:
1538+ * remove(ractor) -> ractor
1539+ *
1540+ * Removes _ractor_ from +self+. Raises an exception if _ractor_ is not added.
1541+ * Returns the removed _ractor_.
1542+ */
15301543static VALUE
15311544ractor_selector_remove (VALUE selv , VALUE rv )
15321545{
@@ -1567,6 +1580,12 @@ ractor_selector_clear_i(st_data_t key, st_data_t val, st_data_t data)
15671580 return ST_CONTINUE ;
15681581}
15691582
1583+ /*
1584+ * call-seq:
1585+ * clear -> self
1586+ *
1587+ * Removes all ractors from +self+. Raises +self+.
1588+ */
15701589static VALUE
15711590ractor_selector_clear (VALUE selv )
15721591{
@@ -1577,6 +1596,12 @@ ractor_selector_clear(VALUE selv)
15771596 return selv ;
15781597}
15791598
1599+ /*
1600+ * call-seq:
1601+ * empty? -> true or false
1602+ *
1603+ * Returns +true+ if no ractor is added.
1604+ */
15801605static VALUE
15811606ractor_selector_empty_p (VALUE selv )
15821607{
@@ -1649,6 +1674,7 @@ ractor_selector_wait_cleaup(rb_ractor_t *cr, void *ptr)
16491674 RACTOR_UNLOCK_SELF (cr );
16501675}
16511676
1677+ /* :nodoc: */
16521678static VALUE
16531679ractor_selector__wait (VALUE selv , VALUE do_receivev , VALUE do_yieldv , VALUE yield_value , VALUE move )
16541680{
@@ -1778,6 +1804,12 @@ ractor_selector__wait(VALUE selv, VALUE do_receivev, VALUE do_yieldv, VALUE yiel
17781804 return rb_ary_new_from_args (2 , ret_r , ret_v );
17791805}
17801806
1807+ /*
1808+ * call-seq:
1809+ * wait(receive: false, yield_value: undef, move: false) -> [ractor, value]
1810+ *
1811+ * Waits until any ractor in _selector_ can be active.
1812+ */
17811813static VALUE
17821814ractor_selector_wait (int argc , VALUE * argv , VALUE selector )
17831815{
@@ -2540,6 +2572,12 @@ RUBY_SYMBOL_EXPORT_BEGIN
25402572void rb_init_ractor_selector (void );
25412573RUBY_SYMBOL_EXPORT_END
25422574
2575+ /*
2576+ * Document-class: Ractor::Selector
2577+ * :nodoc: currently
2578+ *
2579+ * Selects multiple Ractors to be activated.
2580+ */
25432581void
25442582rb_init_ractor_selector (void )
25452583{
0 commit comments