Re: [twsocket] Hang in TIcsWndControl.ProcessMessages

2011-07-13 Thread Angus Robertson - Magenta Systems Ltd
Looks like you try to workaround the asynchronous nature of TWSocket which were a bad idea. Where do you call this and what do you want to achieve? Waiting for all sockets to close cleanly may be necessary before terminating an application, to ensure continuously streamed data is not lost.

Re: [twsocket] Hang in TIcsWndControl.ProcessMessages

2011-07-13 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote: Waiting for all sockets to close cleanly may be necessary before terminating an application, to ensure continuously streamed data is not lost. I do not see a reason why one must wait in a loop processing messages with calls to sleep()in order to

Re: [twsocket] Hang in TIcsWndControl.ProcessMessages

2011-07-12 Thread Eugene Kotlyarov
Does anyone have ideas why TIcsWndControl.ProcessMessages could hang sometimes when socket is used in separate thread? Have you followed the rules: create TWSocket within the thread's execute method OR call ThreadAttach ? Yes socket is created within threads execute method, and it works most

Re: [twsocket] Hang in TIcsWndControl.ProcessMessages

2011-07-12 Thread Francois PIETTE
Does anyone have ideas why TIcsWndControl.ProcessMessages could hang sometimes when socket is used in separate thread? Actually ProcessMessages probably doesn't hang. ProcessMessages it the place from where all events are called. It is likely an event handler which is blocking. You should try