summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/shared/System/Threading
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2019-01-27 11:48:53 -0800
committerJan Kotas <jkotas@microsoft.com>2019-01-27 18:25:07 -0800
commit731b40d96ba0b93057f7334115c3bc00eb434437 (patch)
tree89e8e61956df1a43fccde4611cb3873c067c6c47 /src/System.Private.CoreLib/shared/System/Threading
parent8a29aa185e44c35af76bcb9f15881f23ddd0a84d (diff)
downloadcoreclr-731b40d96ba0b93057f7334115c3bc00eb434437.tar.gz
coreclr-731b40d96ba0b93057f7334115c3bc00eb434437.tar.bz2
coreclr-731b40d96ba0b93057f7334115c3bc00eb434437.zip
Keep CoreCLR-specific temporary hack under ifdef
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/Threading')
-rw-r--r--src/System.Private.CoreLib/shared/System/Threading/Timer.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Threading/Timer.cs b/src/System.Private.CoreLib/shared/System/Threading/Timer.cs
index fa4f56b5a3..9e1f929fc0 100644
--- a/src/System.Private.CoreLib/shared/System/Threading/Timer.cs
+++ b/src/System.Private.CoreLib/shared/System/Threading/Timer.cs
@@ -472,8 +472,12 @@ namespace System.Threading
}
else
{
- // Don't emit this event during EventPipeController. This avoids initializing FrameworkEventSource during start-up which is expensive relative to the rest of start-up.
- if (!EventPipeController.Initializing && FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.ThreadTransfer))
+ if (
+#if CORECLR
+ // Don't emit this event during EventPipeController. This avoids initializing FrameworkEventSource during start-up which is expensive relative to the rest of start-up.
+ !EventPipeController.Initializing &&
+#endif
+ FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.ThreadTransfer))
FrameworkEventSource.Log.ThreadTransferSendObj(this, 1, string.Empty, true, (int)dueTime, (int)period);
success = _associatedTimerQueue.UpdateTimer(this, dueTime, period);