Skip to content

Commit 2cfcd54

Browse files
JavaSaBrCopilot
andauthored
Update README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent bd71df4 commit 2cfcd54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ var value = dictionary.get("key1");
214214

215215
// Thread-safe dictionary with stamped lock
216216
var lockableDictionary = DictionaryFactory.stampedLockBasedRefToRefDictionary();
217-
var stamp = lockableDictionary.readLock();
217+
var stamp = lockableDictionary.writeLock();
218218
try {
219219
lockableDictionary.put("key", "value");
220220
} finally {
221-
lockableDictionary.readUnlock(stamp)
221+
lockableDictionary.writeUnlock(stamp);
222222
}
223223

224224
// Primitive key dictionaries (no boxing overhead)

0 commit comments

Comments
 (0)