2003-10-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Wed, 22 Oct 2003 00:05:04 +0000 (00:05 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Wed, 22 Oct 2003 00:05:04 +0000 (00:05 -0000)
* RemotingServices.cs: (NewUri) use Interlocked.Increment on next_id.

svn path=/trunk/mcs/; revision=19285

mcs/class/corlib/System.Runtime.Remoting/ChangeLog
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs

index 47894a47354dd884e394862fdb8da008a453b1c3..6fe2042df3f7f81ffc4abb59e978fe588b95a84c 100755 (executable)
@@ -1,3 +1,7 @@
+2003-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * RemotingServices.cs: (NewUri) use Interlocked.Increment on next_id.
+
 2003-10-09  Lluis Sanchez Gual <lluis@ximian.com>
 
        * ObjRef.cs: Added new constructor to support CAD channel.
index 0b5940701875622bc542742ae4cf1b7fab1a1149..334ba8cc913bd89b9db46c08b61607e24ead56bf 100644 (file)
@@ -241,7 +241,8 @@ namespace System.Runtime.Remoting
 
                static string NewUri ()
                {
-                       return app_id + Environment.TickCount + "_" + next_id++;
+                       int n = Interlocked.Increment (ref next_id);
+                       return app_id + Environment.TickCount + "_" + n;
                }
 
                public static RealProxy GetRealProxy (object proxy)