Class: RubyVPI::SchedulerClass::Task
- Defined in:
- lib/ruby-vpi/core/scheduler.rb,
lib/ruby-vpi/core/scheduler.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#state ⇒ Object
Returns the value of attribute state.
-
#thread ⇒ Object
Returns the value of attribute thread.
Instance Method Summary collapse
Instance Attribute Details
#state ⇒ Object
Returns the value of attribute state
15 16 17 |
# File 'lib/ruby-vpi/core/scheduler.rb', line 15 def state @state end |
#thread ⇒ Object
Returns the value of attribute thread
15 16 17 |
# File 'lib/ruby-vpi/core/scheduler.rb', line 15 def thread @thread end |
Instance Method Details
#run ⇒ Object
18 19 20 21 |
# File 'lib/ruby-vpi/core/scheduler.rb', line 18 def run self.state = :run self.thread.wakeup end |
#stop ⇒ Object
23 24 25 26 |
# File 'lib/ruby-vpi/core/scheduler.rb', line 23 def stop self.state = :wait Thread.stop end |
#stop? ⇒ Boolean
28 29 30 |
# File 'lib/ruby-vpi/core/scheduler.rb', line 28 def stop? self.thread.stop? and self.state == :wait end |