in reply to Data copied with fork() -> how to access true data?
OTOH, you might use something like POE to get callbacks into 1 process/thread whenever an event is triggered. You could maybe even get away with using alarm() to trigger your own timeouts if you want to get that low-level.
If you are using Tk or some other GUI toolkit, most of them also have some kind of event handling to accomodate this kind of thing (see Tk::Eventloop for instance)
One other strategy that might help if you run multiple processes already (say, for instance you're running the game from CGI or mod_perl) is to use a shared data storage (like a relational database), so all data can be shared "automatically" as long as you check for updates periodically. Other options here are IPC::ShareLite and Cache::Cache.
Have fun figuring out which one you like :-)
Joost.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Data copied with fork() -> how to access true data?
by muba (Priest) on May 31, 2004 at 21:55 UTC | |
by Joost (Canon) on May 31, 2004 at 22:00 UTC | |
by muba (Priest) on May 31, 2004 at 22:12 UTC | |
by Joost (Canon) on May 31, 2004 at 22:18 UTC | |
by muba (Priest) on May 31, 2004 at 22:32 UTC | |
| |
by cLive ;-) (Prior) on Jun 01, 2004 at 00:01 UTC | |
by muba (Priest) on Jun 01, 2004 at 19:10 UTC |