Is it still alive, stopped

2019-06-19 20:03栏目:技术创新

count = 0
t1 = Thread.new { loop { count  = 1 } }
t2 = Thread.new { Thread.stop }
sleep 1

puts t1.alive?    # true
puts t1.stop?     # false
puts t2.alive?    # true
puts t2.stop?     # true

版权声明:本文由新浦京娱乐站_新浦京娱乐场官网_新浦京娱乐发布于技术创新,转载请注明出处:Is it still alive, stopped