Skip to content

Commit

Permalink
Use named mutex for EC access synchronisation
Browse files Browse the repository at this point in the history
This allows other programs (or instances of the same program) to all access the EC synchronously, as long as they use the same mutex name.
  • Loading branch information
Sparronator9999 committed Jan 29, 2025
1 parent ae97a1b commit 4da2163
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion YAMDCC.ECAccess/EC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ private enum ECCommand : byte
/// <summary>
/// Used to synchronise EC access.
/// </summary>
private static readonly Mutex EcMutex = new();
private static readonly Mutex EcMutex = new(false,
"EcMutex-{B39C3216-FB5D-431C-8F7B-C94EA01AB855}");

/// <summary>
/// The underlying driver interface object.
Expand Down

0 comments on commit 4da2163

Please sign in to comment.