Preset state of isLocked and its internal _lockStateFlow
diff --git a/index.html b/index.html index f8ad1e16c8b..25a7aa86de9 100644 --- a/index.html +++ b/index.html @@ -43,7 +43,7 @@
Immutable variant of SmartMutex. In fact will depend on the owner of lockStateFlow
Immutable variant of SmartMutex. In fact will depend on the owner of lockStateFlow
Holds call until this SmartMutex will be re-locked. That means that while isLocked == true, holds will wait for isLocked == false and then try to lock
Holds call until this SmartMutex will be re-locked. That means that while isLocked == true, holds will wait for isLocked == false and then try to lock
Will try to lock this SmartMutex immediataly
True if lock was successful. False otherwise
Will try to lock this SmartMutex immediataly
True if lock was successful. False otherwise
If isLocked == true - will change it to false and return true. If current call will not unlock this SmartMutex - false
If isLocked == true - will change it to false and return true. If current call will not unlock this SmartMutex - false
It is interface which will work like classic Mutex, but in difference have lockStateFlow for listening of the SmartMutex state.
There is Mutable and Immutable realizations. In case you are owner and manager current state of lock, you need Mutable. Otherwise, Immutable.
Any Mutable may produce its Immutable variant which will contains lockStateFlow equal to its Mutable creator
It is interface which will work like classic Mutex, but in difference have lockStateFlow for listening of the SmartMutex state.
There is Mutable and Immutable realizations. In case you are owner and manager current state of lock, you need Mutable. Otherwise, Immutable.
Any Mutable may produce its Immutable variant which will contains lockStateFlow equal to its Mutable creator
Do lock in readSemaphore inside of writeMutex locking
Do lock in readSemaphore inside of writeMutex locking
Composite mutex which works with next rules:
acquireRead require to writeMutex to be free. Then it will take one lock from readSemaphore
releaseRead will just free up one permit in readSemaphore
lockWrite will lock writeMutex and then await while all readSemaphore will be freed. If coroutine will be cancelled during read semaphore freeing, locking will be cancelled too with SmartMutex.Mutable.unlocking of writeMutex
unlockWrite will just unlock writeMutex
Composite mutex which works with next rules:
acquireRead require to writeMutex to be free. Then it will take one lock from readSemaphore
releaseRead will just free up one permit in readSemaphore
lockWrite will lock writeMutex and then await while all readSemaphore will be freed. If coroutine will be cancelled during read semaphore freeing, locking will be cancelled too with SmartMutex.Mutable.unlocking of writeMutex
unlockWrite will just unlock writeMutex
Locking writeMutex and wait while all readSemaphore permits will be freed
Locking writeMutex and wait while all readSemaphore permits will be freed
Release one read permit in readSemaphore
Release one read permit in readSemaphore
Unlock writeMutex
Unlock writeMutex
Immutable variant of SmartSemaphore. In fact will depend on the owner of permitsStateFlow
Immutable variant of SmartSemaphore. In fact will depend on the owner of permitsStateFlow
Preset state of freePermits and its internal _freePermitsStateFlow
Preset state of freePermits and its internal _freePermitsStateFlow
Holds call until this SmartSemaphore will be re-locked. That means that while freePermits == true, holds will wait for freePermits == false and then try to lock
Holds call until this SmartSemaphore will be re-locked. That means that while freePermits == true, holds will wait for freePermits == false and then try to lock
Holds call until this SmartSemaphore will be re-locked. That means that current method will
Holds call until this SmartSemaphore will be re-locked. That means that current method will
Mutable variant of SmartSemaphore. With that variant you may lock and unlock. Besides, you may create Immutable variant of this instance with immutable factory
Preset state of freePermits and its internal _freePermitsStateFlow
Mutable variant of SmartSemaphore. With that variant you may lock and unlock. Besides, you may create Immutable variant of this instance with immutable factory
Preset state of freePermits and its internal _freePermitsStateFlow
If freePermits == true - will change it to false and return true. If current call will not unlock this SmartSemaphore - false
If freePermits == true - will change it to false and return true. If current call will not unlock this SmartSemaphore - false
Will try to lock this SmartSemaphore immediataly
True if lock was successful. False otherwise
Will try to lock this SmartSemaphore immediataly
True if lock was successful. False otherwise
True - locked
False - unlocked
True - locked
False - unlocked
It is interface which will work like classic Semaphore, but in difference have permitsStateFlow for listening of the SmartSemaphore state.
There is Mutable and Immutable realizations. In case you are owner and manager current state of lock, you need Mutable. Otherwise, Immutable.
Any Mutable may produce its Immutable variant which will contains permitsStateFlow equal to its Mutable creator
It is interface which will work like classic Semaphore, but in difference have permitsStateFlow for listening of the SmartSemaphore state.
There is Mutable and Immutable realizations. In case you are owner and manager current state of lock, you need Mutable. Otherwise, Immutable.
Any Mutable may produce its Immutable variant which will contains permitsStateFlow equal to its Mutable creator
Will wait until the SmartSemaphore.permitsStateFlow of this instance will have permits count free permits.
Anyway, after the end of this block there are no any guaranties that SmartSemaphore.freePermits>= permits due to the fact that some other parties may lock it again
Will wait until the SmartSemaphore.permitsStateFlow of this instance will have permits count free permits.
Anyway, after the end of this block there are no any guaranties that SmartSemaphore.freePermits>= permits due to the fact that some other parties may lock it again
Will wait until the SmartSemaphore.permitsStateFlow of this instance will have permits count free permits.
Anyway, after the end of this block there are no any guaranties that SmartSemaphore.freePermits>= permits due to the fact that some other parties may lock it again
Will wait until the SmartSemaphore.permitsStateFlow of this instance will have permits count free permits.
Anyway, after the end of this block there are no any guaranties that SmartSemaphore.freePermits>= permits due to the fact that some other parties may lock it again
Will wait until the SmartMutex.lockStateFlow of this instance will be false.
Anyway, after the end of this block there are no any guaranties that SmartMutex.isLocked == false due to the fact that some other parties may lock it again
Will wait until the SmartMutex.lockStateFlow of this instance will be false.
Anyway, after the end of this block there are no any guaranties that SmartMutex.isLocked == false due to the fact that some other parties may lock it again
Will wait until the SmartMutex.lockStateFlow of this instance will be false.
Anyway, after the end of this block there are no any guaranties that SmartMutex.isLocked == false due to the fact that some other parties may lock it again
Will wait until the SmartMutex.lockStateFlow of this instance will be false.
Anyway, after the end of this block there are no any guaranties that SmartMutex.isLocked == false due to the fact that some other parties may lock it again
Will call SmartSemaphore.Mutable.lock, then execute action and return the result after SmartSemaphore.Mutable.unlock
Will call SmartSemaphore.Mutable.lock, then execute action and return the result after SmartSemaphore.Mutable.unlock
Will call SmartMutex.Mutable.lock, then execute action and return the result after SmartMutex.Mutable.unlock
Will call SmartMutex.Mutable.lock, then execute action and return the result after SmartMutex.Mutable.unlock
Will call SmartSemaphore.Mutable.lock, then execute action and return the result after SmartSemaphore.Mutable.unlock
Will call SmartSemaphore.Mutable.lock, then execute action and return the result after SmartSemaphore.Mutable.unlock
Will call SmartMutex.Mutable.lock, then execute action and return the result after SmartMutex.Mutable.unlock
Will call SmartMutex.Mutable.lock, then execute action and return the result after SmartMutex.Mutable.unlock