[fpc-devel] Mutex!

Vinzent Höfler JeLlyFish.software at gmx.net
Mon Nov 6 01:55:42 CET 2006

Amir Avani wrote:

> Thanks Michael, you are right!
> I want to know how should I use Criticalsections to make my program to
> print only one "here".

By not using them at all?

count := 0;

while true do
    if count = 0
       WriteLn ('Here!');

    count := 1;
end {while};

Critical sections don't make sense in a non-threading context.


More information about the fpc-devel mailing list