mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 10:49:07 +02:00
* WebAssembly threads: fixed bug in LockMutexTimeoutNoWait, caused by the use of
Result instead of Res. This stupid bug broke WebAssembly critical sections, causing random spurious hangs and it took me quite a lot of time to find it!
This commit is contained in:
parent
c2fcb1a833
commit
694341aa78
@ -84,7 +84,7 @@ begin
|
||||
{$IFDEF DEBUGWASMTHREADS}DebugWriteln('LockMutexTimeoutNoWait: entering loop');{$ENDIF}
|
||||
Repeat
|
||||
if TryLockMutex(M) then
|
||||
Result:=lmrOK
|
||||
Res:=lmrOK
|
||||
else if (GetThreadState(MyThread)<>tsRunning) then
|
||||
Res:=lmrError
|
||||
else if (aTimeOutNS>=0) and (GetClockTime>EndTime) then
|
||||
|
Loading…
Reference in New Issue
Block a user