Skip to content

Commit

Permalink
Fixed modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed Feb 15, 2024
1 parent b288ab1 commit ee0ce9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DotNext.Threading/Threading/AsyncAutoResetEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void OnCompleted(DefaultWaitNode node)
/// <summary>
/// Indicates whether this event is set.
/// </summary>
public bool IsSet => Volatile.Read(ref manager.Value);
public bool IsSet => Volatile.Read(in manager.Value);

/// <summary>
/// Sets the state of this event to non signaled, causing consumers to wait asynchronously.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private sealed class FastSessionIdPool : SessionIdPool
internal override int Take()
{
int sessionId;
ulong current, newValue = Volatile.Read(ref control);
ulong current, newValue = Volatile.Read(in control);
do
{
sessionId = BitOperations.TrailingZeroCount(current = newValue);
Expand Down

0 comments on commit ee0ce9d

Please sign in to comment.