Class: BZMQ::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/bzmq/context.rb

Class Method Summary collapse

Class Method Details

.context(io_threads = 1) ⇒ Object

Raises:



6
7
8
9
10
# File 'lib/bzmq/context.rb', line 6

def self.context(io_threads=1)
  @io_threads = io_threads unless @context
  raise ContextError unless @io_threads == io_threads
  @context ||= ZMQ::Context.create io_threads
end