mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add Thread#native_thread_id [Feature #17853]
This commit is contained in:
parent
88e3848fca
commit
46655156dc
5 changed files with 104 additions and 0 deletions
|
@ -835,6 +835,14 @@ native_set_thread_name(rb_thread_t *th)
|
|||
{
|
||||
}
|
||||
|
||||
static VALUE
|
||||
native_thread_native_thread_id(rb_thread_t *th)
|
||||
{
|
||||
DWORD tid = GetThreadId(th->thread_id);
|
||||
if (tid == 0) rb_sys_fail("GetThreadId");
|
||||
return ULONG2NUM(tid);
|
||||
}
|
||||
|
||||
#if USE_MJIT
|
||||
static unsigned long __stdcall
|
||||
mjit_worker(void *arg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue