Compze.Threading.Interprocess
0.7.0-alpha
See the version list below for details.
dotnet add package Compze.Threading.Interprocess --version 0.7.0-alpha
NuGet\Install-Package Compze.Threading.Interprocess -Version 0.7.0-alpha
<PackageReference Include="Compze.Threading.Interprocess" Version="0.7.0-alpha" />
<PackageVersion Include="Compze.Threading.Interprocess" Version="0.7.0-alpha" />
<PackageReference Include="Compze.Threading.Interprocess" />
paket add Compze.Threading.Interprocess --version 0.7.0-alpha
#r "nuget: Compze.Threading.Interprocess, 0.7.0-alpha"
#:package Compze.Threading.Interprocess@0.7.0-alpha
#addin nuget:?package=Compze.Threading.Interprocess&version=0.7.0-alpha&prerelease
#tool nuget:?package=Compze.Threading.Interprocess&version=0.7.0-alpha&prerelease
Compze.Threading.Interprocess
Cross-process synchronization for Compze.Threading. It brings the same pit-of-success locking model — impossible to forget to lock, automatic deadlock diagnosis with dual stack traces — across process boundaries, backed by the operating system's named mutexes.
Extracted from Compze.Threading 0.7.0-alpha so the cross-process primitives can version independently of the
in-process ones. It depends on Compze.Threading for the shared ICriticalSection / IAwaitableCriticalSection
abstractions that both the in-process and cross-process implementations satisfy — so an IMutex is an
ICriticalSection and an IAwaitableMutex is an IAwaitableCriticalSection, interchangeable with their
in-process counterparts wherever the abstraction is what matters.
What it adds
IMutex — a cross-process lock that diagnoses its own deadlocks
A named system Mutex wrapped so it behaves like the rest of Compze.Threading: Global (visible across all
login sessions) and Local (one session) variants, cancellation-token support, abandoned-mutex recovery, and
the same timeout-and-dual-stack-trace deadlock diagnostics as the in-process IMonitor.
IAwaitableMutex — Monitor.Wait semantics across processes
The full condition-wait model — TakeUpdateLockWhen(condition), TakeReadLockWhen(condition), and the
TryTake* variants — working across processes. It releases every nesting level of the lock while waiting and
reacquires on signal, mirroring Monitor.Wait exactly. As far as we know, no other .NET library exposes the
full Monitor/condition-wait model over a cross-process mutex.
using var mutex = IAwaitableMutex.Global("MyResource", directory);
using(mutex.TakeUpdateLockWhen(() => ResourceIsReady()))
{
// Exclusive across every process on the machine; the wait released the lock
// for other processes and reacquired it once the condition held.
}
The async condition waits — TryAwaitAsync, ReadWhenAsync, UpdateWhenAsync, TryUpdateWhenAsync — work across processes
too, and hold no thread while they wait: between polls of the signal (see ISignalPollingPolicy below) nothing waits but a timer.
IProcessShared<T> / IAwaitableProcessShared<T>
Pair a shared object with a cross-process mutex to coordinate access to an external resource — a file, a port, a database — across processes. (For genuine cross-process shared state, see Compze.InterprocessObject, which builds on this package.)
ISignalPollingPolicy — the latency-versus-power knob
Awaiting a cross-process condition polls a memory-mapped change counter, because .NET has no portable
cross-process kernel signal. Each poll wakes the CPU, and frequent wakeups keep it out of its deep low-power
idle states — a real battery cost on laptops. ISignalPollingPolicy decides the poll cadence; the default
backs off adaptively (eager at first, then stretching toward a 50 ms cap), and you can supply your own.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Compze.Contracts (>= 0.7.2)
- Compze.Threading (>= 0.12.0-alpha)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Compze.Threading.Interprocess:
| Package | Downloads |
|---|---|
|
Compze.InterprocessObject
Create an object shared between processes in a single line of code. Fully atomic modifications, await conditions becoming true, automatic corruption recovery, pluggable serialization. |
|
|
Compze.Tessaging.Sqlite
For Compze internal use only. Do not take a direct dependency on this package. SQLite inbox/outbox backend for Compze messaging. |
|
|
Compze.Internals.Testing
For Compze internal use only. Do not take a dependency on this package |
|
|
Compze.Teventive.MemoryImageStateStore
A memory image of taggregates: every taggregate held in memory for the container's life, rebuilt at its start from a snapshot of each, which JSON files, or a database's tables, keep. A taggregate store that keeps taggregates as their state, not their history. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.1-alpha | 0 | 11/25/2026 |
| 0.7.0-alpha | 228 | 11/14/2026 |
| 0.6.0-alpha | 123 | 11/12/2026 |
| 0.5.1-alpha | 199 | 7/24/2026 |
| 0.5.0-alpha | 116 | 7/5/2026 |
- **Targets .NET 11 (`net11.0`) instead of .NET 10, and is compiled with runtime async:** the runtime, instead of state machines the compiler generates, suspends and resumes its async methods, so live stack traces show the real call chain. An application that uses this version must target .NET 11.
- **Requires newer minor versions of other Compze packages:** Compze.Threading 0.12.0-alpha (was 0.11.0-alpha). Upgrading to this version upgrades each package listed here too, so their changelogs apply to this upgrade as well.