Home / lang / lock 
LOCK
Syntax
LOCK [ # ] hStream

Try to put a system lock on an opened stream hStream.

If the stream is already locked by another process then the command fails.

Examples

' Try to lock the file
TRY LOCK #TheFile
IF ERROR THEN
  PRINT "File is already locked. Try again later."
  RETURN
ENDIF
' File is locked, you can do the job now!
...

See also

Stream & Input/Output functions