[JDEV] Threading problem in jabbercom and my solution

Alan.tan Alan.Tan at china.com
Wed Jul 4 07:18:00 CDT 2001

In developing Jabber client, I fould that the jabbercom is not stable sometimes, especially when the server is busy(my server of coz.:).

When debug into the source, I think the reason is that jabbercom postmessage from _DataThd  to TJabberSession to avoid conflict between threads.However,for the asynchronous nature of postmessage,the execute order is not guaranteed. Some strange thing may happen due to the wrong execute order.

My solution is quite simple: Change all the  postmessage into sendmessage, where later can  guarantee the execute order. Another solution is using the Synchronize method of _DataThd, which also utilize SendMessage anyway.

Sorry,Peter.I sent email to you mailbox and jabberd you days ago, but no response :( So I have to post here on the chance of get your notice.


More information about the JDev mailing list