Thanks James, but I think there is a confusion between variable in a same script and different, independent scripts. I have other threads running in this application and I have had no problem sharing variables (using Threads::shared it's very easy), generating events...etc.
Again, my main issue to share information between two processes that are completely independent. It seems that shared memory (there are different packages/solutions out there) is my solution but maybe you have better suggestion since I'm not able to put it in place (except on Mac/Linux).
| [reply] [Watch: Dir/Any] |
Ah... Currently, MCE and MCE::Shared do not work for two or more processes that are completely independent. It seems like the next step to tackle. All the parts are there. Basically, what's missing is for the shared-manager to support TCP/IP. That will be awesome if it could do that.
MCE now includes MCE::Mutex::Flock supporting threads and processes. That includes two or more completely independent processes. It's a start, but TCP/IP is needed regarding the shared-manager. Who knows, it might happen. MCE::Mutex::Flock was added recently.
Thank you, vef445++. Thank you, Perlmonks++.
| [reply] [Watch: Dir/Any] |
In my research I actually found some packages that allow TCP/UDP socket read and write. I would imagine that in many cases, when one application must read a stream from another, UDP is a good solution. I didn't go that route since I couldn't imagine asking my end-users to make sure their firewall is open on port XXX for what is, for the user, a single autonomous application.
Right now, I'm modifying the architecture or this little application so the main script "gui.pl" will call the second one by importing its subroutine(s), not by executing it. So far it's not many modifications. WIP...
I appreciate all the effort people have put in my question :)
| [reply] [Watch: Dir/Any] |