-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hi,
i am not able to take lock on resource.
its always returning false.
i am running on windows with single instance of redis running.
does it work in distributed env only ?
var dlm = new Redlock.CSharp.Redlock(ConnectionMultiplexer.Connect("127.0.0.1:6379"));
Lock lockObject;
Lock newLockObject;
string resourceName = "test";
var locked = dlm.Lock(resourceName, new TimeSpan(0, 0, 10), out lockObject);
//Assert.IsTrue(locked, "Unable to get lock");
locked = dlm.Lock(resourceName, new TimeSpan(0, 0, 10), out newLockObject);
//Assert.IsFalse(locked, "lock taken, it shouldn't be possible");
dlm.Unlock(lockObject);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels