Navigation:  Language Reference > 13 - Built-in Functions >====== THREADLOCKED (returns current execution thread locked state) ====== Previous pageReturn to chapter overviewNext page

THREADLOCKED()

blk2blue.jpg

The THREADLOCKED procedure returns the current execution thread's locked/unlocked state. It returns zero (0) if the thread is unlocked and one (1) if the thread is locked.

Return Data Type:     SIGNED

Example:

X# = THREADLOCKED()             !Returns 1

UNLOCKTHREAD                    !Unlock the thread

X# = THREADLOCKED()             !Returns 0

MyLibraryCodeWithMessageLoop    !Call the code that has its own message loop

LOCKTHREAD                      !Re-lock the thread

See Also:

ACCEPT

LOCKTHREAD

UNLOCKTHREAD