Module: Ably::Modules::AsyncWrapper
- Included in:
- Ably::Models::PaginatedResult, Realtime::Auth, Realtime::Channel, Realtime::Client, Realtime::Presence
- Defined in:
- lib/ably/modules/async_wrapper.rb
Overview
Note:
using this AsyncWrapper should only be used for methods that are used less frequently and typically not run with levels of concurrency due to the limited number of threads available to EventMachine by default. This module requires that the method #logger is defined.
Provides methods to convert synchronous operations into async operations through the use of EventMachine#defer. The async_wrap method can only be called from within an EventMachine reactor, and must be thread safe.