diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-06-01 22:27:13 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-06-01 22:27:13 +0900 |
commit | 9024c7f1bb3ea432a2b52e7c701b06f83aafd4d5 (patch) | |
tree | 0b52d7bc67fde0fcfd4fb30bd2f91c121b0e7b49 /thread.c | |
parent | 6e7e9a80adfe69e6e6d20e01997b97a5c24cd33e (diff) |
Make `Thread#native_thread_id` not-implemented if unsupported
Raise `NotImplementedError` on unsupported platforms regardless
the argument consistently.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3402,6 +3402,7 @@ rb_thread_setname(VALUE thread, VALUE name) return name; } +#if USE_NATIVE_THREAD_NATIVE_THREAD_ID /* * call-seq: * thr.native_thread_id -> integer @@ -3431,6 +3432,9 @@ rb_thread_native_thread_id(VALUE thread) if (rb_threadptr_dead(target_th)) return Qnil; return native_thread_native_thread_id(target_th); } +#else +# define rb_thread_native_thread_id rb_f_notimplement +#endif /* * call-seq: |