QwkSync

QWKSync.NET Concurrency Model

Core rules

QWKSync.NET enforces single-flight concurrency:

This guarantee exists to prevent corruption, duplication, and non-deterministic behaviour. 


What is considered “the same”

Single-flight is defined in terms of the local locations and profile involved in the sync plan:

If any of these overlap between two sessions, QWKSync.NET treats them as a conflict and fails fast. Conflicts are detected by comparing normalised absolute paths using OS-appropriate comparison rules.

Transfer parallelism

Default behaviour is sequential processing:

This is a deliberate constraint to keep behaviour deterministic and reduce safety risks. 

Threading assumptions

Cancellation and concurrency

Single-flight locks or guards must not prevent cancellation from being observed quickly. Avoid blocking waits. Acquire the guard before starting transfers, and ensure all waits honour cancellation.

Retry and concurrency

Retry is core-orchestrated, bounded, and deterministic. Defaults: no retries. 

When retries are enabled:

Transport responsibilities

Transports implement the operations but do not own core-level coordination: