Sorry, the previous email came from a wrong email address. I don't know what happened to it, so I'm resending it.
Jarek ----- Original Message ----- From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 18, 2002 11:45 AM Subject: CurrentTimeZone race condition - fix > > Hi all! > > Included is a patch that eliminates a race condition that occurs in > CurrentTimeZone.GetDaylightChanges() (in TimeZone.cs). > > Before the patch, when 2 threads call DateTime.Now at the same time (for > the very first time in the whole program) an exception is thrown, when a > duplicate key is being added to the hashtable. > > in <0x002ff> 00 System.Collections.Hashtable:PutImpl (object,object,bool) > in <0x00018> 00 System.Collections.Hashtable:Add (object,object) > in <0x00279> 00 System.CurrentTimeZone:GetDaylightChanges (int) > in <0x00028> 00 System.TimeZone:IsDaylightSavingTime (System.DateTime) > in <0x0002b> 00 System.CurrentTimeZone:GetUtcOffset (System.DateTime) > in <0x0008f> 00 System.DateTime:.ctor (bool,long) > in <0x00036> 00 System.DateTime:get_Now () > > The patch that adds a critical section in GetDaylightChanges() which > fixes the problem. Can you, please add it to CVS? > > Jarek >
timezone.patch
Description: Binary data
