----- Original Message -----
From: Jan Dubois <[EMAIL PROTECTED]>
Sent: Wed, 18 Jun 2008 10:58:28 -0700
Re: RE: [perl-win32-gui-users] Avoid the appearance of a "frozen" window

> 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
>
> Cheers,
> -Jan
>
>

Sure, race conditions and IPC are always issues to consider in  
multi-threaded applications.  But, I don't think there is anything  
inherently flawed with pre-spawning off threads as event handlers for  
the various gui elements on a window.  Just build the app to not make  
changes to the window in those threads.

In fact, I feel like that's a preferred approach to spawning off a new  
thread after the main thread handles window events.  Pre  
spawning/forking/whatever shifts a lot of overhead to the application  
initial load time, which leads to a better user experience.  Users  
hate waiting after clicking.

All of this kind of feels like a hack to me (I know all of these  
problems have been solved a bajillion times before), but I don't  
consider myself a great GUI programmer.  I picked Win32::GUI because  
it gave me an easy on-ramp to building a "professional" looking  
windows gui application.  And this was the quickest, best way for me  
to get my code out the door... :)

Thanks,
Charles Alderman





-------------------------------------------------------------------------
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/

Reply via email to