summaryrefslogtreecommitdiff
path: root/thread_win32.c
diff options
context:
space:
mode:
authorKoichi Sasada <[email protected]>2024-02-20 19:09:23 +0900
committerKoichi Sasada <[email protected]>2024-02-21 15:38:29 +0900
commitd578684989fd2d75f086a259719e3eb0fe57ccb2 (patch)
tree182d720a6c0a63a7bcc1f6c48c276d082d074c05 /thread_win32.c
parent91cb30353178004ba57acacf1c39d9c02beff86e (diff)
`rb_thread_lock_native_thread()`
Introduce `rb_thread_lock_native_thread()` to allocate dedicated native thread to the current Ruby thread for M:N threads. This C API is similar to Go's `runtime.LockOSThread()`. Accepted at https://github.com/ruby/dev-meeting-log/blob/master/2023/DevMeeting-2023-08-24.md (and missed to implement on Ruby 3.3.0)
Diffstat (limited to 'thread_win32.c')
-rw-r--r--thread_win32.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/thread_win32.c b/thread_win32.c
index 9e6d10b188..3079f88732 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -1003,4 +1003,10 @@ rb_ractor_sched_barrier_join(rb_vm_t *vm, rb_ractor_t *cr)
vm->ractor.sync.lock_owner = NULL;
}
+bool
+rb_thread_lock_native_thread(void)
+{
+ return false;
+}
+
#endif /* THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION */