ruby 线程学习
i=1 Thread.start{ while true print "Thread 1 \n" i+=1 if i==5 then Thread.kill Thread.current end end } j=1 while true print "Thread 2 \n" j+=1 if j==4 then Thread.exit end end
posted on 2013-07-03 14:58 Ijavascript 阅读(181) 评论(0) 编辑 收藏 举报