summaryrefslogtreecommitdiff
path: root/jni/ruby/benchmark/bm_vm_thread_alive_check1.rb
diff options
context:
space:
mode:
Diffstat (limited to 'jni/ruby/benchmark/bm_vm_thread_alive_check1.rb')
-rw-r--r--jni/ruby/benchmark/bm_vm_thread_alive_check1.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/jni/ruby/benchmark/bm_vm_thread_alive_check1.rb b/jni/ruby/benchmark/bm_vm_thread_alive_check1.rb
new file mode 100644
index 0000000..c993acc
--- /dev/null
+++ b/jni/ruby/benchmark/bm_vm_thread_alive_check1.rb
@@ -0,0 +1,6 @@
+5_000.times{
+ t = Thread.new{}
+ while t.alive?
+ Thread.pass
+ end
+}