Class: Fiber

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/fiber_pool.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object

Attribute Reference–Returns the value of a fiber-local variable, using either a symbol or a string name. If the specified variable does not exist, returns nil.



12
13
14
# File 'lib/vendor/fiber_pool.rb', line 12

def [](key)
  local_fiber_variables[key]
end

#[]=(key, value) ⇒ Object

Attribute Assignment–Sets or creates the value of a fiber-local variable, using either a symbol or a string. See also Fiber#[].



18
19
20
# File 'lib/vendor/fiber_pool.rb', line 18

def []=(key,value)
  local_fiber_variables[key] = value
end