Method: BasicObject#fibril

Defined in:
lib/fibril/core.rb

#fibril(*guard_names, &block) ⇒ Object

This method has two methods of use. Either

  1. call with block to create a new fibril

  2. call without block to create a fibril proxy. Any methods invoked on a proxy are executed on the target from

within a new Fibril



284
285
286
287
288
289
290
# File 'lib/fibril/core.rb', line 284

def fibril(*guard_names, &block)
  if block_given?
    Fibril(*guard_names, &block)
  else
    ::Fibril::FibrilProxy.new(self, *guard_names)
  end
end