Module: Af::QThread::Interface
- Included in:
- Base
- Defined in:
- lib/fiksu-af/q_thread/interface.rb
Instance Method Summary collapse
- #has_message? ⇒ Boolean
- #post_data_message(data, from = Thread.current) ⇒ Object
- #post_message(message) ⇒ Object
- #read_message ⇒ Object
- #requeue(message) ⇒ Object
Instance Method Details
#has_message? ⇒ Boolean
3 4 5 |
# File 'lib/fiksu-af/q_thread/interface.rb', line 3 def return !queue.empty? end |
#post_data_message(data, from = Thread.current) ⇒ Object
19 20 21 |
# File 'lib/fiksu-af/q_thread/interface.rb', line 19 def (data, from = Thread.current) (::Af::QThread::Message.new(data, from)) end |
#post_message(message) ⇒ Object
11 12 13 |
# File 'lib/fiksu-af/q_thread/interface.rb', line 11 def () queue << end |
#read_message ⇒ Object
7 8 9 |
# File 'lib/fiksu-af/q_thread/interface.rb', line 7 def return queue.pop end |
#requeue(message) ⇒ Object
15 16 17 |
# File 'lib/fiksu-af/q_thread/interface.rb', line 15 def requeue() () end |