Skip to main content

with_file_mutation_queue

Function with_file_mutation_queue 

Source
pub async fn with_file_mutation_queue<T, F, Fut>(
    file_path: impl AsRef<Path>,
    f: F,
) -> Result<T, MutationQueueError>
where F: FnOnce() -> Fut, Fut: Future<Output = T>,
Expand description

Serialize f against every other mutation targeting the same realpath. Distinct keys run in parallel. TypeScript withFileMutationQueue.

ยงErrors

Returns MutationQueueError when the queue key cannot be resolved or the (never-closed) semaphore rejects the acquire.