diff options
author | Samuel Williams <[email protected]> | 2020-09-21 09:54:08 +1200 |
---|---|---|
committer | Samuel Williams <[email protected]> | 2020-09-21 11:48:44 +1200 |
commit | 70f08f1eed1df4579fef047d28fc3c807183fcfa (patch) | |
tree | 75b19e3db5bcb6367f000764bf7f5096fc28e0ed /vm_core.h | |
parent | 596173155a15b6d4a7b04bdaf9218b3e756a0683 (diff) |
Make `Thread#join` non-blocking.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3558
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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 { |