Class: Psyllium::State

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

Overview

Holds per-Fiber state for Psyllium operations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeState

Returns a new instance of State.



26
27
28
29
30
31
32
# File 'lib/psyllium/fiber.rb', line 26

def initialize
  @mutex = Thread::Mutex.new
  @started = false
  @joined = false
  @value = nil
  @exception = nil
end

Instance Attribute Details

#exceptionObject

Returns the value of attribute exception.



24
25
26
# File 'lib/psyllium/fiber.rb', line 24

def exception
  @exception
end

#joinedObject

Returns the value of attribute joined.



24
25
26
# File 'lib/psyllium/fiber.rb', line 24

def joined
  @joined
end

#mutexObject (readonly)

Returns the value of attribute mutex.



23
24
25
# File 'lib/psyllium/fiber.rb', line 23

def mutex
  @mutex
end

#startedObject

Returns the value of attribute started.



24
25
26
# File 'lib/psyllium/fiber.rb', line 24

def started
  @started
end

#valueObject

Returns the value of attribute value.



24
25
26
# File 'lib/psyllium/fiber.rb', line 24

def value
  @value
end