question about thread safty.

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
yakir22
Posts: 3
Joined: 26 Jan 2010, 15:24

question about thread safty.

Post by yakir22 »

I want to handle the login process from a different thread than the system handler.
I am going to have in the thread function something like :

User usr = ExtensionHelper.instance().canLogin(userName, pass, chan,this.getOwnerZone(),true);
ActionscriptObject res = new ActionscriptObject();
res.put("_cmd", "logOK");
sendResponse(res, -1, null, userChannel);

my question is : are "canLogin" and "sendResponse" function are thread safe. I looked at the documention but there is nothing there about these specific functions.

Thanks
Yakir.
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

See --> http://www.smartfoxserver.com/docs/docP ... Safety.htm


canLogin --> System Handler is responsible for handling default requests such as "createRoom", "joinRoom", "sendPublicMessage" etc...


sendResponse --> "The Event Writer on the right side of the diagram is responsible for writing data back to the clients, and works similarly to the input controllers: outgoing messages are piled up into the output queue and its worker threads will process them in order."
Smartfox's forum is my daily newspaper.
Post Reply