diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2025-10-03 19:51:01 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-10-04 18:21:13 -0400 |
| commit | 1858233ffaee482a73a91b796f02ebb7ae1306b9 (patch) | |
| tree | 22171b34cb33d4b658e9cf4953d7a88cedb789ad /thread.c | |
| parent | 8eb28da3e73cd571cb06d1450ee87384e37b83a7 (diff) | |
Free the native thread of the main thread on FREE_AT_EXIT
Diffstat (limited to 'thread.c')
| -rw-r--r-- | thread.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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); |
