On 06/28/2011 05:33 PM, Hans-Peter Diettrich wrote:


A critical section (process-local MUTEX) is not related to a specific (memory) resource, except itself, consequently it can not protect any *other* resource. It also does not block any other thread, not waiting for entering the critical section, so that all resources are accessible by all threads, except the critical section (or mutex...) itself.
I understand that you are supposed to do

 CriticalSection.Enter;
   do something with the variables that are protected
 CriticalSection.leave;

What did you think how to use them ? Of course a MUTEX can do other things, too, but here we are discussing "normal" CriticalSection use.
-Michael


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to