Nitrox has asked for the wisdom of the Perl Monks concerning the following question:
I've written a Perl program that sits in a while() loop doing a few tasks, one of which is polling the serial port for data. When data is received the program does some control calls to a win32 application via OLE.
Now I'm looking for a way to pass data(a simple string) back to my Perl program. Any ideas?
One of the issues is that the solution needs to be "non-blocking" since my program needs to continue polling the serial port and lives in a single threaded world.
The win32 app has the ability to run PerlScript via the ActiveX engine, so one solution I thought might work would be to spawn a thread in my Perl app that opened a tcp socket and listened. The win32 app would then run a PerlScript that connected to the socket and passed the string. In turn, the child would then pass the string to the parent. Unfortunately I do not see a way to get the child thread to communicate with the parent.
So, what is the best solution to pass data to a running Perl process in the Win32 environment?
-Nitrox
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inter-Process Communication
by dpuu (Chaplain) on Jul 21, 2002 at 02:29 UTC | |
by Nitrox (Chaplain) on Jul 21, 2002 at 02:48 UTC | |
|
Re: Inter-Process Communication
by perigeeV (Hermit) on Jul 21, 2002 at 02:45 UTC | |
by Nitrox (Chaplain) on Jul 21, 2002 at 03:08 UTC | |
by perigeeV (Hermit) on Jul 21, 2002 at 04:27 UTC | |
by Nitrox (Chaplain) on Jul 21, 2002 at 06:18 UTC | |
|
Re: Inter-Process Communication
by ehdonhon (Curate) on Jul 21, 2002 at 02:12 UTC |