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