This repository has been archived by the owner on Nov 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some cleanup in CoreRT's TimeZoneInfo implementation: - The CachedData locking is currently inconsistent. Some code is using a private Lock object with LockHolder.Hold, while other code is locking against the CachedData instance. This change removes the private Lock object and just locks against the CachedData instance throughout, which is consistent with the CoreCLR implementation. - TimeZoneInfoComparer is being used in two places in CoreRT to sort the list of system time zones, whereas it's only used in one place in CoreCLR. This change refactors the code to have a shared implementation of GetSystemTimeZones in CoreRT that handles the sorting in one place, allowing a single Comparison<T> lambda to be used, which matches the CoreCLR implementation. Now there is a single shared GetSystemTimeZones implementation which calls a private static PopulateAllSystemTimeZones method, which is implemented separately for Win32/WinRT/Unix. - The WinRT implementation of FindSystemTimeZoneById was accessing the cached data without any locking. Added locking.
- Loading branch information
Showing
4 changed files
with
93 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters