Alejandro Torrado
unread,Mar 5, 2012, 1:28:43 PM3/5/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Autobahn
Hi, I'm implementing Autobahn with user actions handled in web,
triggered by the back-end in python. Because of the nature of user
actions, these are executed in separated threads for separated users.
The code looks something like this:
def onMessage(self, msg, binary):
class ActionThread(CThread):
def __init__(self, protocol):
self.protocol = protocol
def run(self):
.......
print 1
self.protocol.sendMessage("something")
print 2
.......
ActionThread(self).start()
Doing this, the message "something" isn't delivered even though 1 and
2 are printed to console. Then, when the user sends another message to
the server, the first message arrives.
How can I fix this? Thanks!