On Thu, 25 Sep 2008, Angel Pais wrote: Hi Angel,
> First of all I must say you are right, this code isn't thread safe: > lInUse := ! lInUse > But i've also said its only a simplification. > In a real program this code: > 1- goes inside a sync method of a class > 2- the logical var does not exit > 3- the array is a var of the class > 4- the class is referenced by in a Public var > My intention was to show you that any manipulation of a public var must be > enclosed by some kind of semaphore ( be it implemented as a sync method, > mutex or logical var) OK, Thanks for confirmation now it's clear. Only the example confused me. > Any code you want compiled and tested in xbase++ just send it to me and I'll > be glad to report the results back to you. Thank you very much for you proposition. I'll create code to test the relations and lock behavior in released workarea. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour