Class: Fiber

Inherits:
Object
  • Object
show all
Defined in:
lib/thread_root_fiber/fiber.rb,
lib/thread_root_fiber/fiber.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.rootObject



2
3
4
# File 'lib/thread_root_fiber/fiber.rb', line 2

def root
  Thread.current.root_fiber
end

Instance Method Details

#root?Boolean Also known as: root_fiber?

Returns:

  • (Boolean)


8
9
10
# File 'lib/thread_root_fiber/fiber.rb', line 8

def root?
  self == Fiber.root
end