Navigation

Operators and Keywords

Function List:

C++ API

SETFILESEMAPHORE  Set semaphore for file access.
   SEMAPHORE = SETFILESEMAPHORE(FILENAME) sets a semaphore to get
   exclusive access on file FILE. The semaphore is realized by generating
   a simple Matlab data file after checking that no other semaphores are
   existing. The function exits if the semaphore is set. Exclusive file
   access is of course only guaranteed if all other Matlab processes use
   semaphores to access the same file.

   The output variable SEMAPHORE is needed to correctly remove the file
   semaphore after file access. It is an error to call function
   SETFILESEMAPHORE without output arguments.

   SEMAPHORE = SETFILESEMAPHORE(FILELIST) sets semaphores for all files
   given in cell array FILELIST. Note that function SETFILESEMAPHORE waits
   for exclusive file access on ALL files in the list before exiting.

		Note: A semaphore older than 20 seconds is considered as invalid and
		will immediately be deleted.
   
		Markus Buehren
		Last modified 13.11.2007

   See also REMOVEFILESEMAPHORE.