Code: Select all
h=CreateMutex()
Procedure test( h )
LockMutex(h)
Debug "t1"
LockMutex(h)
Debug "t2"
EndProcedure
LockMutex(h)
Debug "M1"
LockMutex(h)
Debug "M2"
UnlockMutex(h) : UnlockMutex(h) ; both are required. It acts like a semaphore in this regard.
WaitThread(CreateThread(@test(),h))

