> On Wed, 18 Jun 2008, Charles Alderman wrote:
> > I've had some luck doing this using fork() and a pipe to communicate
> > between the (pseudo) processes. On Win32, fork is emulated using perl
> > threads. So it's basically the same thing. I haven't tested this on
> > Perl 5.10 yet, but I've had a gui application built this way running
> > and in use for more than 18 months now.
> >
> > Create and layout the window before spawning a new process/thread, as
> > both pseudo processes can use the same gui handles.
>
> You are not really supposed to use GUI handles from a thread that doesn't
> own them (the one that has created them). While "read" access is generally
> safe, modifying GUI objects from non-owning threads isn't. For example:
>
> http://blogs.msdn.com/oldnewthing/archive/2005/10/10/479124.aspx
Just to add that you can also spawn multiple threads, each creating their own
Win32::GUI windows (with their own message queues) allowing each thread to have
each an "instance" of the application. It might sound clunky, but it does scale
well on dual/quad cores.
Cheers,
jez.
_________________________________________________________________
http://clk.atdmt.com/UKM/go/msnnkmgl0010000007ukm/direct/01/
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/