Method: XfOOrth::XfOOrth_Fiber#initialize
- Defined in:
- lib/fOOrth/library/fiber_library.rb
#initialize(&block) ⇒ XfOOrth_Fiber
Build up the fiber instance. A fiber is a light-weight coroutine.
22 23 24 25 26 |
# File 'lib/fOOrth/library/fiber_library.rb', line 22 def initialize(&block) @stack = [] @fiber = Fiber.new &lambda{|vm| block.call(vm); nil} @status = NEW end |