摘要:
Fiber可以让程序分段执行。fiber.rbfiber = Fiber.new do puts "before yield" Fiber.yield 1 puts "after yield" 2endputs "before resume1"puts fiber.resumeputs "before resume2"puts fiber.resumeputs "before resume3"puts fiber.resumeputs "after resume"结果:bef 阅读全文
posted @ 2013-07-25 13:54
Leo Forest
阅读(402)
评论(0)
推荐(0)
浙公网安备 33010602011771号