Closed janosmiko closed 2 years ago
Sorry Janos. Thank you for the contribution but this is not going to work. The random token prevents two clients from accidentally accessing the same resource more than once. Having a shared secret would most certainly result in race conditions that you are trying to avoid.
Using this PR, you are able to obtain a lock that was already locked (e.g.: it was created by other process).
To make it possible, you have to provide the same Secret during calling the Obtain() function.