Page 1 of 1

handleInternalRequest thread safety

Posted: 14 Dec 2011, 13:53
by Hygiliak
I have developed two games that have some shared data that need to be synchronized. Because I did not forsee this when I first wrote the code, I have each game in its own zone, and in order to synchronize them, I use handleInternalRequest (until I reprogram them to be in the same zone, as they are both in production right now).
Both games use java zone level extensions so I have to be careful with thread safety.

My question is:
In which thread does the code from the "handleInternalRequest" method run?

Server Version: 1.6.9 on Linux

Posted: 14 Dec 2011, 15:53
by rjgtav
Hello.

If i'm not mistaken, all the extension related code runs in the ExtensionHandler, which can have multiple threads accessing it (by default it only has 1)

Posted: 14 Dec 2011, 16:41
by Lapo
Exactly. It runs within one of the ExtensionHandler threads

Posted: 14 Dec 2011, 16:57
by Hygiliak
Thank you for the quick reply. Cheers.