-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc fixes to C# locator discovery #3177
Misc fixes to C# locator discovery #3177
Conversation
@@ -11,11 +11,6 @@ public Ice.Plugin | |||
create(Ice.Communicator communicator, string name, string[] args) => new PluginI(communicator); | |||
} | |||
|
|||
public interface Plugin : Ice.Plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use this (obviously) internal API in C++ and Java, but not in C#, where it's internal unused code.
{ | ||
while (!_locators.ContainsKey(instanceName) && _pending) | ||
{ | ||
Monitor.Wait(_mutex, waitTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only Monitor.Wait(_mutex, ...), which means all the Monitor.Pulse(_mutex) elsewhere are useless.
{ | ||
// Exit the mutex lock before proceeding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awaiting a remote call with a mutex lock (see below) is incorrect and deadlock prone. It could be the cause for #2813.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Is the runTimerTask
also unused internal code?
jose@mac IceLocatorDiscovery % rg runTimerTask
PluginI.cs
526: public void runTimerTask()
``
The timer task (and runTimerTask) are used, e.g. _timer.schedule(this, _timeout); |
This PR fixes a couple bugs in the C# LocatorDiscovery and removes dead code.
See also #2813.