[Lazarus] thread safe

Michael Schnell mschnell at lumino.de
Wed Jun 29 17:09:22 CEST 2011


On 06/28/2011 07:06 PM, José Mejuto wrote:
> *** This one must work
> Thread/core/processor 2
> -----------------------
> while true do begin
>    Critical.Enter;
>    if a<>b then Raise Exception.Create('KBOOM!');
>    Critical.Leave;
> end;
>
> If the second one will not work in a n-code processor, or SMP, please
> tell me why not. Of course the performance will be quite poor.
Did you experience that it does not work ? IMHO that would be really ban 
news.

-Michael





More information about the Lazarus mailing list