Add id to thread.Thread

This commit is contained in:
gingerBill
2021-10-24 12:30:25 +01:00
parent 06f4762144
commit c9e6862332
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -24,7 +24,8 @@ _create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^
__windows_thread_entry_proc :: proc "stdcall" (t_: rawptr) -> win32.DWORD {
t := (^Thread)(t_)
context = t.init_context.? or_else runtime.default_context()
t.id = sync.current_thread_id()
t.procedure(t)
if t.init_context == nil {