Andrew Brunner schrieb:
On Mon, Jun 27, 2011 at 2:51 PM, Hans-Peter Diettrich
<[email protected]> wrote:
Absolutely incorrect.
Why?
Two reasons.
1.) Visibility. A critical section does not particularly protect
visibility as with 2 threads accessing a piece of memory.
This is exactly what I wanted to say. A critical section does *not*
enforce a MB (by visibility).
2.) Execution Order. A critical section does not protect or ensure
that code will be executed in any particular order.
Right. When execution order (race conditions) is of interest, it must be
established by other means. Here is where deadlocks enter the scene.
I think that you didn't understand what I wanted to say. Hard to tell,
due to the snipped details you are referring to :-(
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus