summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/thread.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/ruby/thread.h b/include/ruby/thread.h
index f6eea65b70..f11cc19086 100644
--- a/include/ruby/thread.h
+++ b/include/ruby/thread.h
@@ -243,9 +243,12 @@ typedef struct rb_internal_thread_event_hook rb_internal_thread_event_hook_t;
* @param[in] events A set of events that `func` should run.
* @param[in] data Passed as-is to `func`.
* @return An opaque pointer to the hook, to unregister it later.
- * @note This functionality is a noop on Windows.
+ * @note This functionality is a noop on Windows and WebAssembly.
* @note The callback will be called without the GVL held, except for the
* RESUMED event.
+ * @note Callbacks are not guaranteed to be executed on the native threads
+ * that corresponds to the Ruby thread. To identify which Ruby thread
+ * the event refers to, you must use `event_data->thread`.
* @warning This function MUST not be called from a thread event callback.
*/
rb_internal_thread_event_hook_t *rb_internal_thread_add_event_hook(
@@ -258,7 +261,7 @@ rb_internal_thread_event_hook_t *rb_internal_thread_add_event_hook(
*
* @param[in] hook. The hook to unregister.
* @return Wether the hook was found and unregistered.
- * @note This functionality is a noop on Windows.
+ * @note This functionality is a noop on Windows and WebAssembly.
* @warning This function MUST not be called from a thread event callback.
*/
bool rb_internal_thread_remove_event_hook(