class XfOOrth::XfOOrth_SyncBundle

The fOOrth Synchronized Bundle class. A bundle contains multiple fibers.

Public Class Methods

new(fibers=[]) click to toggle source

Build up the synchronized bundle instance

Calls superclass method XfOOrth::XfOOrth_Bundle::new
# File lib/fOOrth/library/sync_bundle_library.rb, line 13
def initialize(fibers=[])
  @sync = Mutex.new
  super(fibers)
end

Public Instance Methods

add_fibers(fibers) click to toggle source

Add the fibers to this bundle.

Calls superclass method XfOOrth::XfOOrth_Bundle#add_fibers
# File lib/fOOrth/library/sync_bundle_library.rb, line 19
def add_fibers(fibers)
  @sync.synchronize{super(fibers)}
end
length() click to toggle source

how many fibers in this bundle?

Calls superclass method XfOOrth::XfOOrth_Bundle#length
# File lib/fOOrth/library/sync_bundle_library.rb, line 29
def length
  @sync.synchronize{super}
end
status() click to toggle source

What is the status of this bundle?

Calls superclass method XfOOrth::XfOOrth_Bundle#status
# File lib/fOOrth/library/sync_bundle_library.rb, line 24
def status
  @sync.synchronize{super}
end
step(vm) click to toggle source

Let the fiber run for one step

Calls superclass method XfOOrth::XfOOrth_Bundle#step
# File lib/fOOrth/library/sync_bundle_library.rb, line 34
def step(vm)
  @sync.synchronize{super(vm)}
end