Class: PWork::Async::Task
- Inherits:
-
Object
- Object
- PWork::Async::Task
- Defined in:
- lib/pwork/async/task.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#caller ⇒ Object
Returns the value of attribute caller.
-
#error ⇒ Object
Returns the value of attribute error.
-
#id ⇒ Object
Returns the value of attribute id.
-
#state ⇒ Object
Returns the value of attribute state.
-
#thread_local_storage ⇒ Object
Returns the value of attribute thread_local_storage.
Instance Method Summary collapse
-
#initialize ⇒ Task
constructor
A new instance of Task.
Constructor Details
#initialize ⇒ Task
Returns a new instance of Task.
11 12 13 14 15 |
# File 'lib/pwork/async/task.rb', line 11 def initialize self.id = SecureRandom.uuid self.state = :pending self.thread_local_storage = [] end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
9 10 11 |
# File 'lib/pwork/async/task.rb', line 9 def block @block end |
#caller ⇒ Object
Returns the value of attribute caller.
10 11 12 |
# File 'lib/pwork/async/task.rb', line 10 def caller @caller end |
#error ⇒ Object
Returns the value of attribute error.
8 9 10 |
# File 'lib/pwork/async/task.rb', line 8 def error @error end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/pwork/async/task.rb', line 5 def id @id end |
#state ⇒ Object
Returns the value of attribute state.
6 7 8 |
# File 'lib/pwork/async/task.rb', line 6 def state @state end |
#thread_local_storage ⇒ Object
Returns the value of attribute thread_local_storage.
7 8 9 |
# File 'lib/pwork/async/task.rb', line 7 def thread_local_storage @thread_local_storage end |