Class: Rbgo::CoRun::Scheduler
- Inherits:
-
Object
- Object
- Rbgo::CoRun::Scheduler
- Includes:
- Singleton
- Defined in:
- lib/rbgo/corun.rb
Instance Attribute Summary collapse
-
#check_interval ⇒ Object
Returns the value of attribute check_interval.
-
#io_machine ⇒ Object
Returns the value of attribute io_machine.
-
#num_thread ⇒ Object
Returns the value of attribute num_thread.
Instance Method Summary collapse
Instance Attribute Details
#check_interval ⇒ Object
Returns the value of attribute check_interval.
157 158 159 |
# File 'lib/rbgo/corun.rb', line 157 def check_interval @check_interval end |
#io_machine ⇒ Object
Returns the value of attribute io_machine.
157 158 159 |
# File 'lib/rbgo/corun.rb', line 157 def io_machine @io_machine end |
#num_thread ⇒ Object
Returns the value of attribute num_thread.
157 158 159 |
# File 'lib/rbgo/corun.rb', line 157 def num_thread @num_thread end |
Instance Method Details
#schedule(routine, new_thread: false, queue_tag: :default) ⇒ Object
352 353 354 355 356 357 358 359 360 |
# File 'lib/rbgo/corun.rb', line 352 def schedule(routine, new_thread: false, queue_tag: :default) if new_thread msg_queue << [:new_thread, routine, queue_tag] else queue = get_queue(queue_tag) queue << routine end nil end |