Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Fix possible race due to multiple concurrent assignement of the wait …
Browse files Browse the repository at this point in the history
…event in PendingCall.
  • Loading branch information
garuma committed Sep 20, 2010
1 parent ec2eb66 commit 84f2126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PendingCall.cs
Expand Up @@ -39,7 +39,7 @@ public Message Reply
conn.DispatchSignals ();
} else {
if (waitHandle == null)
waitHandle = new ManualResetEvent (false);
Interlocked.CompareExchange (ref waitHandle, new ManualResetEvent (false), null);

// TODO: Possible race condition?
while (reply == null)
Expand Down

0 comments on commit 84f2126

Please sign in to comment.