mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Free the native thread of the main thread on FREE_AT_EXIT
This commit is contained in:
parent
8eb28da3e7
commit
1858233ffa
Notes:
git
2025-10-04 22:22:51 +00:00
@ -64,6 +64,8 @@ void rb_thread_io_close_wait(struct rb_io *);
|
||||
|
||||
void rb_ec_check_ints(struct rb_execution_context_struct *ec);
|
||||
|
||||
void rb_thread_free_native_thread(void *th_ptr);
|
||||
|
||||
RUBY_SYMBOL_EXPORT_BEGIN
|
||||
|
||||
void *rb_thread_prevent_fork(void *(*func)(void *), void *data); /* for ext/socket/raddrinfo.c */
|
||||
|
||||
9
thread.c
9
thread.c
@ -529,6 +529,15 @@ thread_cleanup_func(void *th_ptr, int atfork)
|
||||
rb_native_mutex_destroy(&th->interrupt_lock);
|
||||
}
|
||||
|
||||
void
|
||||
rb_thread_free_native_thread(void *th_ptr)
|
||||
{
|
||||
rb_thread_t *th = th_ptr;
|
||||
|
||||
native_thread_destroy_atfork(th->nt);
|
||||
th->nt = NULL;
|
||||
}
|
||||
|
||||
static VALUE rb_threadptr_raise(rb_thread_t *, int, VALUE *);
|
||||
static VALUE rb_thread_to_s(VALUE thread);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user