Distributed lock

Hi, I would like to create a distributed lock in couchbase for my project, so ı found a really good document about my question: Is it possible to use CB for a distributed lock?

But I wonder that when my long-time runner job is finished then ı want to remove the current lock? I found the ‘dispose’ method, but I am not sure that is it an effective way

Yes, calling Dispose() releases the lock. I usually use a using statement to guarantee it is called.

Brant

1 Like