Class: Ori::Scope::ThreadLocalState
- Inherits:
-
Object
- Object
- Ori::Scope::ThreadLocalState
- Defined in:
- lib/ori/scope.rb
Instance Attribute Summary collapse
-
#blocked ⇒ Object
readonly
Returns the value of attribute blocked.
-
#fiber_ids ⇒ Object
readonly
Returns the value of attribute fiber_ids.
-
#pending ⇒ Object
readonly
Returns the value of attribute pending.
-
#readable ⇒ Object
readonly
Returns the value of attribute readable.
-
#tasks ⇒ Object
readonly
Returns the value of attribute tasks.
-
#waiting ⇒ Object
readonly
Returns the value of attribute waiting.
-
#writable ⇒ Object
readonly
Returns the value of attribute writable.
Instance Method Summary collapse
- #child_scopes ⇒ Object
- #child_scopes? ⇒ Boolean
-
#initialize ⇒ ThreadLocalState
constructor
A new instance of ThreadLocalState.
Constructor Details
#initialize ⇒ ThreadLocalState
Returns a new instance of ThreadLocalState.
21 22 23 24 25 26 27 28 29 |
# File 'lib/ori/scope.rb', line 21 def initialize @fiber_ids = LazyHash.new @tasks = LazyHash.new @pending = LazyArray.new @readable = LazyHashSet.new @writable = LazyHashSet.new @waiting = LazyHash.new @blocked = LazyHash.new end |
Instance Attribute Details
#blocked ⇒ Object (readonly)
Returns the value of attribute blocked.
13 14 15 |
# File 'lib/ori/scope.rb', line 13 def blocked @blocked end |
#fiber_ids ⇒ Object (readonly)
Returns the value of attribute fiber_ids.
13 14 15 |
# File 'lib/ori/scope.rb', line 13 def fiber_ids @fiber_ids end |
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
13 14 15 |
# File 'lib/ori/scope.rb', line 13 def pending @pending end |
#readable ⇒ Object (readonly)
Returns the value of attribute readable.
13 14 15 |
# File 'lib/ori/scope.rb', line 13 def readable @readable end |
#tasks ⇒ Object (readonly)
Returns the value of attribute tasks.
13 14 15 |
# File 'lib/ori/scope.rb', line 13 def tasks @tasks end |
#waiting ⇒ Object (readonly)
Returns the value of attribute waiting.
13 14 15 |
# File 'lib/ori/scope.rb', line 13 def waiting @waiting end |
#writable ⇒ Object (readonly)
Returns the value of attribute writable.
13 14 15 |
# File 'lib/ori/scope.rb', line 13 def writable @writable end |
Instance Method Details
#child_scopes ⇒ Object
31 32 33 |
# File 'lib/ori/scope.rb', line 31 def child_scopes @child_scopes ||= Set.new end |
#child_scopes? ⇒ Boolean
35 36 37 |
# File 'lib/ori/scope.rb', line 35 def child_scopes? defined?(@child_scopes) && !@child_scopes.empty? end |