mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-06 00:08:23 +00:00
Replace deprecated serialized calls with withLock
This commit is contained in:
1 parent
ffc63fbd4b
commit
72d9e22bc3
11 files changed
+30
-30
No files matched your search
@@ -27,7 +27,7 @@ import type { LiveSyncEventHub } from "@vrtmrz/livesync-commonlib/context";
|
||||
import type { StorageAccess } from "@vrtmrz/livesync-commonlib/compat/interfaces/StorageAccess";
|
||||
import { EVENT_CONFLICT_CANCELLED } from "@vrtmrz/livesync-commonlib/compat/events/coreEvents";
|
||||
import { NO_INTERACTION } from "@vrtmrz/livesync-commonlib/replication";
|
||||
import { isLockAcquired, serialized } from "octagonal-wheels/concurrency/lock";
|
||||
import { isLockAcquired, withLock } from "octagonal-wheels/concurrency/lock";
|
||||
import diff_match_patch from "diff-match-patch";
|
||||
import { stripAllPrefixes, isPlainText } from "@vrtmrz/livesync-commonlib/compat/string_and_binary/path";
|
||||
|
||||
@@ -192,7 +192,7 @@ export function createConflictResolutionOperations(
|
||||
// per-file lock. Dialogues for other paths remain untouched.
|
||||
dependencies.events.emitEvent(EVENT_CONFLICT_CANCELLED, filename);
|
||||
}
|
||||
return await serialized(serialisationKey, async () => {
|
||||
return await withLock(serialisationKey, async () => {
|
||||
if (latestResolveRequestByFilename.get(filename) !== requestId) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user