diff options
| author | Koichi Sasada <ko1@atdot.net> | 2024-02-20 19:09:23 +0900 |
|---|---|---|
| committer | Koichi Sasada <ko1@atdot.net> | 2024-02-21 15:38:29 +0900 |
| commit | d578684989fd2d75f086a259719e3eb0fe57ccb2 (patch) | |
| tree | 182d720a6c0a63a7bcc1f6c48c276d082d074c05 /thread_none.c | |
| parent | 91cb30353178004ba57acacf1c39d9c02beff86e (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_none.c')
| -rw-r--r-- | thread_none.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/thread_none.c b/thread_none.c index cb35aea708..76bdc9e200 100644 --- a/thread_none.c +++ b/thread_none.c @@ -318,4 +318,10 @@ rb_thread_sched_mark_zombies(rb_vm_t *vm) // do nothing } +bool +rb_thread_lock_native_thread(void) +{ + return false; +} + #endif /* THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION */ |
