Code: Select all
Global ShutdownInd.b ; Global shutdown flag, can be checked by threads
Global ShutdownMutex = CreateMutex() ; Global shutdown mutex
.
.
.
; ** Thread :
LockMutex(ShutdownMutex) ; <----- Is this necessary?
ShutdownInd.b = #True ; Set global flag to close down server service
UnlockMutex(ShutdownMutex) ; <----- Is this necessary?


