From 5b5cc485498b17efa9a1ad7303ae14f328e2d51a Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 7 Jun 2014 20:34:06 -0700 Subject: [PATCH] Reverted mono fix because it breaks on .net 4 --- src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs b/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs index 6fb79379a..4ad89fe5e 100644 --- a/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs +++ b/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs @@ -82,7 +82,9 @@ namespace NzbDrone.Core.Messaging.Commands // This will detach the scheduler from the thread, causing new Task creating in the command to be executed on the ThreadPool, avoiding a deadlock. // Please note that the issue only shows itself on mono because since Microsoft .net implementation supports Task inlining on WaitAll. _taskFactory.StartNew(() => ExecuteCommand(command) - , TaskCreationOptions.PreferFairness | (TaskCreationOptions)0x10) + , TaskCreationOptions.PreferFairness) +// This breaks on systems that don't have .Net 4.5 installed (but works fine when it does, even though we are targetting 4.0) +// , TaskCreationOptions.PreferFairness | (TaskCreationOptions)0x10) .LogExceptions(); return command;