fix native_thread_destroy() timing

With M:N thread scheduler, the native thread (NT) related resources
should be freed when the NT is no longer needed. So the calling
`native_thread_destroy()` at the end of `is will be freed when
`thread_cleanup_func()` (at the end of Ruby thread) is not correct
timing. Call it when the corresponding Ruby thread is collected.
This commit is contained in:
Koichi Sasada 2023-10-13 01:14:17 +09:00
parent 2794a8fef6
commit cdb36dfe7d
4 changed files with 26 additions and 32 deletions

View file

@ -139,11 +139,6 @@ ruby_mn_threads_params(void)
{
}
static void
native_thread_destroy(rb_thread_t *th)
{
}
void
ruby_init_stack(volatile VALUE *addr)
{