Author: gert
Date: 2007-12-08 11:02:41 -0500 (Sat, 08 Dec 2007)
New Revision: 90994

Modified:
   trunk/mcs/class/System/System.Diagnostics/ChangeLog
   trunk/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs
Log:
* LocalFileEventLog.cs: To allow entry to be fully written before
attempting to read it, added small sleep period in the Created event
of the FSW.


Modified: trunk/mcs/class/System/System.Diagnostics/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/ChangeLog 2007-12-08 15:46:59 UTC 
(rev 90993)
+++ trunk/mcs/class/System/System.Diagnostics/ChangeLog 2007-12-08 16:02:41 UTC 
(rev 90994)
@@ -1,3 +1,9 @@
+2007-12-08  Gert Driesen  <[EMAIL PROTECTED]>
+
+       * LocalFileEventLog.cs: To allow entry to be fully written before
+       attempting to read it, added small sleep period in the Created event
+       of the FSW.
+
 2007-12-04  Gert Driesen  <[EMAIL PROTECTED]>
 
        * Process.cs: Modified StartInfo to throw ArgumentNullException when

Modified: trunk/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs      
2007-12-08 15:46:59 UTC (rev 90993)
+++ trunk/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs      
2007-12-08 16:02:41 UTC (rev 90994)
@@ -37,6 +37,7 @@
 using System.Runtime.InteropServices;
 using System.Security;
 using System.Text;
+using System.Threading;
 
 namespace System.Diagnostics
 {
@@ -156,6 +157,9 @@
                                                _notifying = true;
                                        }
 
+                                       // allow for file to be finished writing
+                                       Thread.Sleep (100);
+
                                        // Process every new entry in one 
notification event.
                                        try {
                                                while (GetLatestIndex () > 
last_notification_index) {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to