Reputation: 18291
I am trying to do two things in parallel:
NOT_DONE_YET
)I know how to make each of these two things separately, but how can I do them in parallel? To be specific, how can I receive messages from ZeroMQ inside the Twisted framework, when I am already listening to TCP sockets?
Upvotes: 1
Views: 368
Reputation: 31910
You can get support for ZMQ here, in txZMQ.
It sounds like you already know how to deal with the HTTP request.
To do these things in parallel, just create your ZmqSubConnection
and your twisted.web.server.Site
, with references to each other as necessary for your application. No special set-up is required.
Just make sure you only create and run one reactor. Other people with similar questions sometimes don't understand that reactor.run()
means "run the event loop for the whole process", and not "run this one thing I set up".
Upvotes: 1