copying the latest Sys.Web.Services from trunk.
[mono.git] / mcs / class / System / System.IO / FileSystemWatcher.cs
index d3d421ccc21e40ba9d2e166e9914c0156a2fcc27..e4018da121066702c4b881f7e59770a51b775630 100644 (file)
@@ -57,7 +57,6 @@ namespace System.IO {
                bool disposed;
                string mangledFilter;
                static IFileWatcher watcher;
-               static object lockobj = new object ();
 
                #endregion // Fields
 
@@ -105,7 +104,7 @@ namespace System.IO {
 
                void InitWatcher ()
                {
-                       lock (lockobj) {
+                       lock (typeof (FileSystemWatcher)) {
                                if (watcher != null)
                                        return;