H
Hannes
Hi,
I'm trying to find a better design for communication between a c++ and a
perl/Tk program (processes running at the same time).
Both processes show some graphical content in a window.
If the perl/Tk process updates the view (by user interaction) the c++
program should do so also (immediately) and vice versa.
The values of some variables have to be exchanged.
Formerly I tried this with an SysV IPC shared memory block, which contains
the value of some variables. The "signal" to the other process to update
was implemented via signals (e.g. SIGUSR2). This works fine for the one
direction (perl->c++) but not for the other way due to some "property" of
safe signal handling (in Perl) and Tk MainLoop (see topics: "Tk +
perl-5.8.0 eat and delays signals" and the recent thread "Toplevel doesn't
update").
While trying to find the best design for such a task a few things should be
considered:
1) The production environment: Perl 5.8, Tk 800.024
2) Preferably the solution should be platform independent
3) and (of cause) fast and safe.
Has anybody a good idea? Or tried something similar with success?
Any ideas are welcome...
Thanks
Hannes
PS: I posted this on comp.lang.perl.tk before, but since its not really
related to perl/Tk I think this is the better place.
I'm trying to find a better design for communication between a c++ and a
perl/Tk program (processes running at the same time).
Both processes show some graphical content in a window.
If the perl/Tk process updates the view (by user interaction) the c++
program should do so also (immediately) and vice versa.
The values of some variables have to be exchanged.
Formerly I tried this with an SysV IPC shared memory block, which contains
the value of some variables. The "signal" to the other process to update
was implemented via signals (e.g. SIGUSR2). This works fine for the one
direction (perl->c++) but not for the other way due to some "property" of
safe signal handling (in Perl) and Tk MainLoop (see topics: "Tk +
perl-5.8.0 eat and delays signals" and the recent thread "Toplevel doesn't
update").
While trying to find the best design for such a task a few things should be
considered:
1) The production environment: Perl 5.8, Tk 800.024
2) Preferably the solution should be platform independent
3) and (of cause) fast and safe.
Has anybody a good idea? Or tried something similar with success?
Any ideas are welcome...
Thanks
Hannes
PS: I posted this on comp.lang.perl.tk before, but since its not really
related to perl/Tk I think this is the better place.