From 704dd25812f34228a28f37c37757a675ad078a2b Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 6 Feb 2023 09:29:39 +0100 Subject: 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. --- thread_none.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'thread_none.c') diff --git a/thread_none.c b/thread_none.c index a82ced684e..253a8dd518 100644 --- a/thread_none.c +++ b/thread_none.c @@ -34,6 +34,8 @@ thread_sched_to_waiting(struct rb_thread_sched *sched) { } +#define thread_sched_to_dead thread_sched_to_waiting + static void thread_sched_yield(struct rb_thread_sched *sched, rb_thread_t *th) { -- cgit v1.2.1