jamwt/diesel — pull request #32 by sdiehl (2012-04-07 16:15:29+00:00)
Title: Allow specifying context

Having a zmq Context being created as import time side-effect can cause problems if we try to use the context across processes or threads, like uncatchable C asserts which can halt the interpreter.

Letting us specify the context as an optional argument and falling back on the global instance is a remedy for the issue. See: http://zeromq.github.com/pyzmq/api/generated/zmq.core.context.html#zmq.core.context.Context.instance