Top Level Namespace

Defined Under Namespace

Classes: BasicObject, Enumerator, Fibril

Instance Method Summary collapse

Instance Method Details

#Fibril(*guard_names, &block) ⇒ Object

Create a new fibril



223
224
225
226
227
228
229
230
231
# File 'lib/fibril/core.rb', line 223

def Fibril(*guard_names, &block)
  fibril = Fibril.new(&block)
  return fibril unless Fibril.running
  Fibril::Guard.create(fibril).tap do |guard|
    guard_names.each do |name|
      Fibril.guard.send("#{name}=", guard)
    end
  end
end