PumpkinSeed / bucket

[DEPRECATED] Optimized data structure framework for Couchbase specialized on one bucket usage
GNU General Public License v3.0
6 stars 2 forks source link

Implement lock operations #62

Open hajnalandor opened 4 years ago

PumpkinSeed commented 4 years ago

Can you tell more details about what you mean?

hajnalandor commented 4 years ago

In gocb package there are 2 methods, GetAndLock and Unlock. GetAndLock locks a document for a period of time, providing exclusive RW access to it,meanwhile Unlock works in the reverse direction.

PumpkinSeed commented 4 years ago

Yes, I used this GetAndLock in the incrmntr package, but it's strictly related to the #49, becase after you call GetAndLock the only way to release the lock if you use the Cas or without any operation call the Unlock.