From 1a9b5a1e86ffe4ab7b15dbfef00e5c4e02c4a510 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:46:13 +0000 Subject: Utilisateur : Fcolin Date : 3/11/03 Heure : 18:48 Archivé dans $/EScribe/Ivy Commentaire: (vss 9) --- CSharp/Ivy/Ivy/IvyClient.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'CSharp/Ivy') diff --git a/CSharp/Ivy/Ivy/IvyClient.cs b/CSharp/Ivy/Ivy/IvyClient.cs index 006b69c..faddee4 100644 --- a/CSharp/Ivy/Ivy/IvyClient.cs +++ b/CSharp/Ivy/Ivy/IvyClient.cs @@ -134,6 +134,7 @@ namespace IvyBus private Hashtable regexp_text; private int appPort; private bool peerCalling; + private volatile bool running = false; private volatile Thread clientThread; // volatile to ensure the quick communication private Int32 clientKey; private static bool doping = (ConfigurationSettings.AppSettings["IVY_PING"] != null); @@ -257,6 +258,11 @@ namespace IvyBus // we can be summoned to quit from two path at a time clientThread = null; t.Interrupt(); + // Tell newThread to go to sleep. + running = false; + // Wait for newThread to end. + t.Join(); + } /// compares two peers the id is the couple (host,service port). @@ -332,7 +338,7 @@ namespace IvyBus traceDebug("normally Disconnected from " + appName); traceDebug("Thread stopped"); // first, I'm not a first class IvyClient any more - //bus.removeClient(this); + // bus.removeClient(this); // invokes the Disconnected applicationListeners bus.FireClientDisconnected(this); } -- cgit v1.1