LC.mutex.*

The module LC.mutex provides so-called „mutexes“ to synchronize multiple Lua threads.

LC.mutex.debug(enable)
Parameter
  • enable (Boolean) – enable/disable debug logging

Enable or disable debugging of mutex operations. With debugging enabled, every call of LC.mutex.lock() and LC.mutex.unlock() will be logged (using LC.log.print()).

LC.mutex.lock(name)
Parameter
  • name (String) – mutex name

Lock the mutex named mutex. If no mutex exists with that name, a new one is created automatically.

LC.mutex.unlock(name)
Parameter
  • name (String) – mutex name

Release the lock for the mutex named mutex. That mutex must have been locked before, otherwise undefined errors may occur.


Zuletzt aktualisiert am 29.06.2020.
weiter: LC.sys.*
zurück: LC.log.*