Skip to content

Commit

Permalink
rb_thread_sched_destroy is not used now at all
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Mar 22, 2024
1 parent 127d7a3 commit e2a9b87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion thread.c
Expand Up @@ -259,7 +259,6 @@ timeout_prepare(rb_hrtime_t **to, rb_hrtime_t *rel, rb_hrtime_t *end,
}

MAYBE_UNUSED(NOINLINE(static int thread_start_func_2(rb_thread_t *th, VALUE *stack_start)));
MAYBE_UNUSED(static void rb_thread_sched_destroy(struct rb_thread_sched *sched));
MAYBE_UNUSED(static bool th_has_dedicated_nt(const rb_thread_t *th));
MAYBE_UNUSED(static int waitfd_to_waiting_flag(int wfd_event));

Expand Down
2 changes: 2 additions & 0 deletions thread_none.c
Expand Up @@ -46,10 +46,12 @@ rb_thread_sched_init(struct rb_thread_sched *sched, bool atfork)
{
}

#if 0
static void
rb_thread_sched_destroy(struct rb_thread_sched *sched)
{
}
#endif

// Do nothing for mutex guard
void
Expand Down
2 changes: 2 additions & 0 deletions thread_win32.c
Expand Up @@ -155,13 +155,15 @@ rb_thread_sched_init(struct rb_thread_sched *sched, bool atfork)
sched->lock = w32_mutex_create();
}

#if 0
// per-ractor
void
rb_thread_sched_destroy(struct rb_thread_sched *sched)
{
if (GVL_DEBUG) fprintf(stderr, "sched destroy\n");
CloseHandle(sched->lock);
}
#endif

rb_thread_t *
ruby_thread_from_native(void)
Expand Down

0 comments on commit e2a9b87

Please sign in to comment.