Class: WindUp::Router::SmallestMailbox
- Defined in:
- lib/wind_up/routers.rb
Overview
Send message to the worker with the smallest mailbox
Instance Method Summary collapse
Methods inherited from Base
#<<, #add_subscriber, #broadcast, #initialize, #remove_subscriber, #send_message, #subscribers
Constructor Details
This class inherits a constructor from WindUp::Router::Base
Instance Method Details
#next_subscriber ⇒ Object
99 100 101 |
# File 'lib/wind_up/routers.rb', line 99 def next_subscriber subscribers.sort { |a,b| a.size <=> b.size }.first end |