PythonPusherClient
PythonPusherClient copied to clipboard
Message callbacks should be called in the main thread
When we receive some data, the callback is called in the web socket channel's thread. It can lead to serious issues when mixed with other non thread-safe calls.
I had severe issues when using this library within a Twisted project. I tried to handle this non-thread-safe code like this: http://twistedmatrix.com/documents/current/core/howto/threading.html - but it didn't quite work.