I'm creating my mutex:
FMutex := TMutex.Create(nil, False, 'SomeDumbText');
and use it in a method which calls another method using the same created mutex:
procedure a;
begin
FMutex.Acquire;
try
//do some work here and maybe call b
finally
FMutex.Release;
end;
end;
procedure b;
begin
FMutex.Acquire;
try
//do some work here
finally
FMutex.Release;
end;
end;
It is safe to have nested mutex?