xiper has asked for the wisdom of the Perl Monks concerning the following question:
Update: Some background, for those wanting to solve the 'bigger picture':
I have a Tk front-end that needs make calls to a linux back-end server over tcp, for which i am using SOAP. No problems there. However, SOAP blocks while making a call, which of course will stall the Tk event-loop. So the front-end forks (before any Tk stuff) a 'handler', whose job it is to do any time-consuming background processing, such as SOAP calls, while the event-loop cycles.
My plan was, and i already have the test code to do this, to have the Tk process pipe a command to the 'handler' and waitVariable( \%share{wait} ) on a shared hash, with args in $share{in}. The 'handler' does SOAPy-type stuff (in another sub-process so it can be canceled/killed/timed-out, if needed), writes the return data to $share{out} when finished, and $share{wait}++'s to continue the Tk code.
This method has the following advantages:
Unfortunately, i was relying on Tie::Win32MemMap to achieve the win32 side of this (this app will also run locally on the linux box). On testing, the underlying module Win32::MemMap (whose author seems to have gone AWOL), appears to be built for WinNT, and fails spectacularly in an alarming variety of ways under XP...
Code is available if required, in case my description wasn't that clear.
- ><iper
use japh; print;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Shared variables under win32?
by BrowserUk (Patriarch) on Feb 03, 2004 at 05:26 UTC | |
by halley (Prior) on Feb 03, 2004 at 16:34 UTC | |
by BrowserUk (Patriarch) on Feb 03, 2004 at 17:23 UTC | |
by xiper (Friar) on Feb 03, 2004 at 06:14 UTC | |
Re: Shared variables under win32?
by Roger (Parson) on Feb 03, 2004 at 05:27 UTC | |
by xiper (Friar) on Feb 03, 2004 at 05:59 UTC | |
Re: Shared variables under win32?
by NetWallah (Canon) on Feb 03, 2004 at 05:46 UTC | |
Re: Shared variables under win32?
by flyingmoose (Priest) on Feb 03, 2004 at 14:24 UTC | |
by xiper (Friar) on Feb 04, 2004 at 01:34 UTC | |
Re: Shared variables under win32?
by ysth (Canon) on Feb 03, 2004 at 16:53 UTC | |
Re: Shared variables under win32?
by bobtfish (Scribe) on Feb 04, 2004 at 12:53 UTC | |
Re: Shared variables under win32?
by Roger (Parson) on Feb 06, 2004 at 16:51 UTC |