> In triggersessionclosed, I postthreadmessage to a message handler in the
> same worker thread which then thread-detaches and posts the object to
> listener thread. However, in every 1-2 hours, under heavy load, the worker
> thread gives an AV which I suspect is due to a recv/send callback event
> being launched after threaddetach. How can I prevent this?

If you had looked at the source code, you could have seen that when
ThreadDetach is called, the socket is asked to stop sending notifications
(WSAASyncSelect is called with nul mask) and the hidden window is cancelled.
So technically speaking, no notification can take place before you attach
the socket again to a thread in which case a new hidden window is assigned
and WSAASyncSelect called to request notifications from winsock.

In ICS-V6, the hidden window is shared by several components. ThreadDetach
unregister the messages which where used by the component.

--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
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