summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CSharp/Ivy/IvyPPC/Ivy.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs
index ed4c4aa..c97b545 100644
--- a/CSharp/Ivy/IvyPPC/Ivy.cs
+++ b/CSharp/Ivy/IvyPPC/Ivy.cs
@@ -64,7 +64,7 @@ namespace IvyBus
get
{
String s = appName + " clients are: ";
- lock( clients.SyncRoot )
+ lock( clients )
{
foreach (IvyClient client in clients.Values )
{
@@ -249,7 +249,7 @@ namespace IvyBus
((IvyWatcher) watchers[i]).stop();
}
// stopping the remaining IvyClients
- lock(clients.SyncRoot)
+ lock( clients )
{
foreach (IvyClient c in clients.Values )
{
@@ -286,7 +286,7 @@ namespace IvyBus
int count = 0;
// an alternate implementation would one sender thread per client
// instead of one for all the clients. It might be a performance issue
- lock ( clients.SyncRoot )
+ lock ( clients )
{
foreach (IvyClient client in clients.Values )
{
@@ -318,7 +318,7 @@ namespace IvyBus
lock (regexp_out) regexp_out.Add( key, regexp);
lock (callback) callbacks.Add( key, callback);
// notifies the other clients this new regexp
- lock ( clients.SyncRoot )
+ lock ( clients )
{
foreach (IvyClient c in clients.Values )
{
@@ -339,7 +339,7 @@ namespace IvyBus
{
throw new IvyException("client wants to remove an unexistant regexp " + id);
}
- lock( clients.SyncRoot )
+ lock( clients )
{
foreach (IvyClient c in clients.Values )
{
@@ -419,7 +419,7 @@ namespace IvyBus
*/
internal void removeClient(IvyClient c)
{
- lock( clients.SyncRoot )
+ lock( clients )
{
clients.Remove(c.ClientKey);
}
@@ -449,12 +449,12 @@ namespace IvyBus
internal void addClient(MyTcpClient socket)
{
- lock(this)
+ lock( clients )
{
if (stopped)
return ;
IvyClient client = new IvyClient(this,socket);
- lock ( clients.SyncRoot )
+ lock ( clients )
{
clients.Add( client.ClientKey, client);
}
@@ -543,7 +543,7 @@ namespace IvyBus
{
if (clnt.AppPort == 0)
return false;
- lock( clients.SyncRoot )
+ lock( clients )
{
foreach (IvyClient client in clients.Values )
{