Skip to content

Commit

Permalink
Reduced lock contention
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed Aug 30, 2024
1 parent a006e5a commit 2cf4a0f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/DotNext.Threading/Threading/QueuedSynchronizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ public TagList MeasurementTags
}

private protected bool RemoveAndSignal(LinkedValueTaskCompletionSource<bool> node, out bool resumable)
{
RemoveNode(node);
return node.TrySetResult(Sentinel.Instance, completionToken: null, result: true, out resumable);
}
=> RemoveNode(node)
? node.TrySetResult(Sentinel.Instance, completionToken: null, result: true, out resumable)
: resumable = false;

/// <summary>
/// Enables capturing information about suspended callers in DEBUG configuration.
Expand Down

0 comments on commit 2cf4a0f

Please sign in to comment.