I'm not sure why you're trying to do this at all, instead of just using Twisted in a single-threaded manner.
This is a usage case that we run into regularly. We have a lot of PB based servers, but sometimes people want to use a client to them from an interactive Python or IPython prompt. At that point you have to run the reactor in a different thread. But, I have never seen a method of putting a blocking API on top of such a client that was _really_ thread safe. I have seen a few approaches that seem to work, but that are clearly non-thread safe. I would love to see a robust solution for this problem though - one that could be fully trusted.
Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python