If you find something, please let us know! By the way, the mechanism is in use for year. If there is a flaw, it could only be in a special corner case otherwise we already fixed it.
-- francois.pie...@overbyte.be Embarcadero MVP http://www.overbyte.be http://francois-piette.blogspot.com -----Message d'origine----- De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la part de Eric Fleming Bonilha Envoyé : vendredi 17 mai 2013 22:27 À : twsocket@elists.org Objet : [twsocket] RES: Shared handles problem Well I have seen that you UnregisterMessage routine already removes messages from the queue: if FHandle > 0 then while PeekMessage(LMsg, FHandle, Msg, Msg, PM_REMOVE) do {loop} ; Strange.. must be something else, I will keep digging! Eric De: Eric Fleming Bonilha [mailto:e...@digifort.com.br] Enviada em: sexta-feira, 17 de maio de 2013 17:11 Para: twsocket@elists.org Assunto: Shared handles problem Hello ICS team, I´m currently using your implementation of shared handles in all my applications (I have actually removed all AllocateHwnd and changed to use your implementation in your to share handles between objects and save some OS resources), and I think that I have found a flaw in the system but I´m not sure how to fix. The problem that I´m facing is that Unsent messages are being received sometimes After a lot of debugging and testing I think that I have came to a conclusion: In my tests, I create many objects and destroy them, so, there are many operations to allocate handles (From your lib) and deallocate them What I could observe is that if I create an object (Allocating a shared message from your system), send a message to it and destroy it (deallocating this message), and creating more objects, the message ID that was allocated to a previous object (already freed) is now allocated to a new object, and the message that was posted is still not received.. so, when the main thread actually process the message and tries to dispatch the message, it will be dispatched to this new object, creating a great mess in the software So I´m not expert in your structure.. but could that scenario occur? Thanks! Eric -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be