Exception: ZZQ::NotInAsyncContext
- 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
-
#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
constructor
A new instance of NotInAsyncContext.
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 |