Class: Shamu::Events::InMemory::AsyncService

Inherits:
Service show all
Defined in:
lib/shamu/events/in_memory/async_service.rb

Overview

An asynchronous version of Service. Event subscribers should be able to handle events coming in on a separate thread.

Instance Method Summary collapse

Methods inherited from Service

#channel_stats, #publish, #subscribe

Methods included from ChannelStats

#channel_stats

Methods inherited from EventsService

bridge, create, #deserialize, #publish, #serialize, #subscribe

Methods inherited from Services::Service

#cache_for, #cached_lookup, #entity_list, #entity_lookup_list, #error, #find_by_lookup, #lazy_association, #lookup_association

Instance Method Details

#dispatch

This method returns an undefined value.

Dispatch all pending mssages in the given named channels.

Parameters:

  • names (Array<String>)

    of the channels to dispatch. Dispatches to all queues if empty.



26
27
28
# File 'lib/shamu/events/in_memory/async_service.rb', line 26

def dispatch
  # No-op since messages are immediately dispatched on background threads.
end