I use multithreading but I never had this problem.
I have one difference: my threads are handled by a thread pool class. 
Basically all suspended threads do not have any hidden windows either by 
itself or because they use components having a hidden windows. I have 
separated the communication (ICS component) from processing (database stuff 
and other). The threads are used for processing. All communication is done 
in a single thread which is never suspended (a single thread can handle a 
lot of simultaneous connections, thanks to ICS async nature).

Separating communication is processing has the advantage of a better layered 
application, easier to develop and maintain.

--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: "asvetov" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Friday, February 17, 2006 9:58 PM
Subject: Re: [twsocket] TWsocket in Threads and ShellExecute


> Hello, Wilfried!
>
> Thank you for clarifying this. Do you have any recommendations how to 
> avoid this behaviour?  I think many people works with different ICS 
> components in threads and reuse threads (doing suspend/resume) and all 
> they have this problem? Or I▓ am the only one who haven▓t solved this :)
>
> Best regards, A. Svetov
>
>>Hello asvetov,
>>
>>This is normal behaviour in windows. If you create a (hidden) window in
>>a thread you must pump messages or your system can deadlock. If you
>>suspend a thread having a window then it cannot pump, so that is what
>>you experiance.
>>
>>---
>>Rgds, Wilfried [TeamICS]
>>http://www.overbyte.be/eng/overbyte/teamics.html
>>http://www.mestdagh.biz
>>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to