From dd19011aa66c00977c4e18b959d8c317860cbb63 Mon Sep 17 00:00:00 2001 From: Ben Maurer Date: Thu, 26 May 2005 23:18:18 +0000 Subject: locking fixes svn path=/trunk/mcs/; revision=45088 --- mcs/class/System/System.IO/FileSystemWatcher.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mcs/class/System/System.IO/FileSystemWatcher.cs') diff --git a/mcs/class/System/System.IO/FileSystemWatcher.cs b/mcs/class/System/System.IO/FileSystemWatcher.cs index e4018da1210..d3d421ccc21 100644 --- a/mcs/class/System/System.IO/FileSystemWatcher.cs +++ b/mcs/class/System/System.IO/FileSystemWatcher.cs @@ -57,6 +57,7 @@ namespace System.IO { bool disposed; string mangledFilter; static IFileWatcher watcher; + static object lockobj = new object (); #endregion // Fields @@ -104,7 +105,7 @@ namespace System.IO { void InitWatcher () { - lock (typeof (FileSystemWatcher)) { + lock (lockobj) { if (watcher != null) return; -- cgit v1.2.3