diff options
author | Jean Boussier <byroot@ruby-lang.org> | 2023-02-06 09:29:39 +0100 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2023-03-06 13:10:42 +0100 |
commit | 704dd25812f34228a28f37c37757a675ad078a2b (patch) | |
tree | 2482f2434bcbf9632aaa5aaba7e16ad84d5351d5 /thread_win32.c | |
parent | 22d944c8b76be04dc437100c46626db5fe9dd7f0 (diff) | |
download | ruby-704dd25812f34228a28f37c37757a675ad078a2b.tar.gz |
TestThreadInstrumentation: emit the EXIT event sooner
```
1) Failure:
TestThreadInstrumentation#test_thread_instrumentation [/tmp/ruby/src/trunk-repeat20-asserts/test/-ext-/thread/test_instrumentation_api.rb:33]:
Call counters[4]: [3, 4, 4, 4, 0].
Expected 0 to be > 0.
```
We fire the EXIT hook after the call to `thread_sched_to_dead` which
mean another thread might be running before the `EXIT` hook have been
executed.
Diffstat (limited to 'thread_win32.c')
-rw-r--r-- | thread_win32.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/thread_win32.c b/thread_win32.c index e9deff23cc..b5d10e2200 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -131,6 +131,8 @@ thread_sched_to_running(struct rb_thread_sched *sched, rb_thread_t *th) if (GVL_DEBUG) fprintf(stderr, "gvl acquire (%p): acquire\n", th); } +#define thread_sched_to_dead thread_sched_to_waiting + static void thread_sched_to_waiting(struct rb_thread_sched *sched) { |