Main Content


Represent a MAT-file persistence service mutex


mps.sync.TimedMATFileMutex is synchronization primitive used to protect data in a MAT-file database from being simultaneously accessed by multiple workers.


Create a mps.sync.TimedMATFileMutex object using mps.sync.mutex.


expand all

This property is read-only.

Duration of advisory lock in seconds.

Example: 10

This property is read-only.

Name of connection to persistence service.

Example: 'myRedisConnection'

This property is read-only.

Name of advisory lock, specified as a character vector.

Example: 'myMutex'

Object Functions

mps.sync.mutexCreate a persistence service mutex
acquireAcquire advisory lock on persistence service mutex
ownCheck ownership of advisory lock on a persistence service mutex object
releaseRelease advisory lock on persistence service mutex


Create a MAT-File Lock Object

mctrl = mps.cache.control('myMATFileConnection','MatlabTest','Folder','c:\tmp')
lk = mps.sync.mutex('myMATFileMutex','Connection','myMATFileConnection')
lk = 

  TimedMATFileMutex with properties:

        Expiration: 10
    ConnectionName: 'myMATFileConnection'
         MutexName: 'myMATFileMutex'

Version History

Introduced in R2018b

See Also

| | | (MATLAB Compiler SDK) | | (MATLAB Compiler SDK) |