From 70f08f1eed1df4579fef047d28fc3c807183fcfa Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Mon, 21 Sep 2020 09:54:08 +1200 Subject: Make `Thread#join` non-blocking. --- vm_core.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 88dc905a77..44f85ff3a0 100644 --- a/vm_core.h +++ b/vm_core.h @@ -812,11 +812,6 @@ struct rb_unblock_callback { struct rb_mutex_struct; -typedef struct rb_thread_list_struct{ - struct rb_thread_list_struct *next; - struct rb_thread_struct *th; -} rb_thread_list_t; - typedef struct rb_ensure_entry { VALUE marker; VALUE (*e_proc)(VALUE); @@ -832,6 +827,12 @@ typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) * 2 + 3]; typedef struct rb_fiber_struct rb_fiber_t; +struct rb_waiting_list { + struct rb_waiting_list *next; + struct rb_thread_struct *thread; + struct rb_fiber_struct *fiber; +}; + struct rb_execution_context_struct { /* execution information */ VALUE *vm_stack; /* must free, must mark */ @@ -958,7 +959,7 @@ typedef struct rb_thread_struct { VALUE locking_mutex; struct rb_mutex_struct *keeping_mutexes; - rb_thread_list_t *join_list; + struct rb_waiting_list *join_list; union { struct { -- cgit v1.2.3