aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 02d7986942..ea9e2a5b62 100644
--- a/vm.c
+++ b/vm.c
@@ -1664,11 +1664,14 @@ static VALUE
thread_alloc(VALUE klass)
{
VALUE volatile obj;
- //rb_thread_t *th = thread_recycle_struct();
- //obj = Data_Wrap_Struct(klass, rb_thread_mark, thread_free, th);
+#ifdef USE_THREAD_RECYCLE
+ rb_thread_t *th = thread_recycle_struct();
+ obj = Data_Wrap_Struct(klass, rb_thread_mark, thread_free, th);
+#else
rb_thread_t *th;
obj = Data_Make_Struct(klass, rb_thread_t,
rb_thread_mark, thread_free, th);
+#endif
return obj;
}