mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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)
This commit is contained in:
parent
91cb303531
commit
d578684989
8 changed files with 165 additions and 14 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue