On Mon, Jun 27, 2011 at 12:52 PM, Hans-Peter Diettrich <[email protected]> wrote: > You forget the strength of protection. A MB will disallow immediately any > concurrent access to the memory area - no way around. Protection by other > means only can work in *perfect* cooperation, a very weak model.
Absolutely incorrect. entercricitalsection(); loop a:=b+c; end loop; leavecriticalsection(); thread 2 can read a and b and c at any state. If you want an accurate view of a,b,c you need to employ interlocked statements :-) -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
