handleInternalRequest thread safety

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

Moderators: Lapo, Bax

Hygiliak
Posts: 8
Joined: 15 Apr 2011, 18:47

handleInternalRequest thread safety

Postby Hygiliak » 14 Dec 2011, 13:53

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
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 14 Dec 2011, 15:53

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)
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 14 Dec 2011, 16:41

Exactly. It runs within one of the ExtensionHandler threads
Lapo
--
gotoAndPlay()
...addicted to flash games
Hygiliak
Posts: 8
Joined: 15 Apr 2011, 18:47

Postby Hygiliak » 14 Dec 2011, 16:57

Thank you for the quick reply. Cheers.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 25 guests