mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 10:49:07 +02:00
* WebAssembly threads: reformat code in LockMutexTimeoutNoWait for better
readability by removing begin..end blocks and replacing it with an 'else if' chain. No functional changes.
This commit is contained in:
parent
cc2406ad74
commit
c2fcb1a833
@ -85,16 +85,10 @@ begin
|
||||
Repeat
|
||||
if TryLockMutex(M) then
|
||||
Result:=lmrOK
|
||||
else
|
||||
begin
|
||||
If (GetThreadState(MyThread)<>tsRunning) then
|
||||
Res:=lmrError
|
||||
else
|
||||
begin
|
||||
If (aTimeOutNS>=0) and (GetClockTime>EndTime) then
|
||||
Res:=lmrTimeOut
|
||||
end;
|
||||
end;
|
||||
else if (GetThreadState(MyThread)<>tsRunning) then
|
||||
Res:=lmrError
|
||||
else if (aTimeOutNS>=0) and (GetClockTime>EndTime) then
|
||||
Res:=lmrTimeOut;
|
||||
Until (res<>lmrNone);
|
||||
{$IFDEF DEBUGWASMTHREADS}DebugWriteln('LockMutexTimeoutNoWait: done loop');{$ENDIF}
|
||||
LockMutexTimeoutNoWait:=Res;
|
||||
|
Loading…
Reference in New Issue
Block a user