azure service fabric - How to acquire a particular lock? -
how can acquire update, exclusive lock? article states “a user can ask update lock instead of shared lock” didn't find way specify type of lock.
currently have dictionary stores lists. goal is: when reads list — let's take snapshot , don't block else. when going modify list — let's take exclusive lock or maybe update lock (honestly can't find difference) , else should wait before transaction commits, even reads should not possible.
the detail i'm failing understand is: how specify if intention read, allow read of collection, , when intention read , write(we not able alter existing data in other way), transaction should wait locks , read , modify collection.
there's enum called lockmode can pass methods on reliable dictionaries , queues allow specify functionality desired. afaik, methods support trygetvalue , containskey on dictionaries , trypeek on queues. i've been confused article myself, lead believe specify per transaction (which awesome btw). @ moment options lockmode rather limited.
Comments
Post a Comment