Skip to content

Commit

Permalink
dont lock to run server_request_call
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed May 9, 2016
1 parent df0872f commit 1e1fa08
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/csharp/Grpc.Core/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class Server
readonly TaskCompletionSource<object> shutdownTcs = new TaskCompletionSource<object>();

bool startRequested;
bool shutdownRequested;
volatile bool shutdownRequested;

/// <summary>
/// Create a new server.
Expand Down Expand Up @@ -246,12 +246,9 @@ private int AddPortInternal(ServerPort serverPort)
/// </summary>
private void AllowOneRpc()
{
lock (myLock)
if (!shutdownRequested)
{
if (!shutdownRequested)
{
handle.RequestCall(HandleNewServerRpc, environment);
}
handle.RequestCall(HandleNewServerRpc, environment);
}
}

Expand Down

0 comments on commit 1e1fa08

Please sign in to comment.