Arno Garrels a écrit : > Hello, > > After a big fight with deadlocks and race conditions for one day my > threaded TWSocketServer derivation is now working stable. > (tested with Wilfrieds GPRS Client and other stressing clients) > But.. I have still a tiny problem with ThreadDetach. > An AV is sometimes raised (see MadExcept trace below) from within > the Execute procedure when csDestroying is in client's ComponentState. > I can work around that by checking for (Client.ComponentState = []) > but I don't think it's good practice. It happens only when the > destructor is called and a lot of threads are busy. > > Any idea? > > --- > Arno Garrels [TeamICS] > if Assigned(Client) then > Client.ThreadDetach; <= *********AV here************
Hi Arno, Have you tried to look at *what* causes the AV ? is it Client which is already destroyed (but that Client variable is not "Niled") or is it something withiin ThreadDetach proc which is "Niled" (or a variable within destroyed but not "niled") ? -- Guillaume MAISON - [EMAIL PROTECTED] 83, Cours Victor Hugo 47000 AGEN Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50 e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com -- 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