Exception: ZZQ::NotInAsyncContext

Inherits:
Error
  • Object
show all
Defined in:
lib/zzq/error.rb

Overview

Raised when a socket method is called outside an Async::Task. ZZQ is fiber-first: wrap calls in ‘Async do … end` or use the block form of #connect / #bind.

Instance Method Summary collapse

Constructor Details

#initialize(msg = "ZZQ socket methods must run inside an Async task. " \ "Wrap in `Async do ... end`, or use the block form " \ "of #connect/#bind.") ⇒ NotInAsyncContext

Returns a new instance of NotInAsyncContext.



17
18
19
20
21
# File 'lib/zzq/error.rb', line 17

def initialize(msg = "ZZQ socket methods must run inside an Async task. " \
                     "Wrap in `Async do ... end`, or use the block form " \
                     "of #connect/#bind.")
  super
end