Skip to content

Commit

Permalink
Fix/4434 idle cpu - removing unused #if compile time conditionals (#4438
Browse files Browse the repository at this point in the history
)

* cleaned up IFDEFs for Full trust thread pool execution

* removed some more IFDEF code

* cleaned up more IFDEFs

* Revert "cleaned up more IFDEFs"

This reverts commit 1345aac.

* Revert "removed some more IFDEF code"

This reverts commit b2b9f42.
  • Loading branch information
Aaronontheweb authored Jun 17, 2020
1 parent 5e559f7 commit 7592725
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions src/core/Akka/Dispatch/AbstractDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@ private static DedicatedThreadPoolSettings ConfigureSettings(Config config)
/// </summary>
internal sealed class ThreadPoolExecutorServiceFactory : ExecutorServiceConfigurator
{
#if APPDOMAIN
private static readonly bool IsFullTrusted = AppDomain.CurrentDomain.IsFullyTrusted;
#endif

/// <summary>
/// TBD
Expand All @@ -229,10 +227,9 @@ internal sealed class ThreadPoolExecutorServiceFactory : ExecutorServiceConfigur
/// <returns>TBD</returns>
public override ExecutorService Produce(string id)
{
#if APPDOMAIN
if (IsFullTrusted)
return new FullThreadPoolExecutorServiceImpl(id);
#endif

return new PartialTrustThreadPoolExecutorService(id);
}

Expand Down
3 changes: 0 additions & 3 deletions src/core/Akka/Dispatch/Dispatchers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Configuration;
using Akka.Configuration;
using Helios.Concurrency;
using ConfigurationFactory = Akka.Configuration.ConfigurationFactory;

Expand Down Expand Up @@ -45,7 +44,6 @@ protected ThreadPoolExecutorService(string id) : base(id)
}
}

#if UNSAFE_THREADING
/// <summary>
/// INTERNAL API
/// </summary>
Expand All @@ -68,7 +66,6 @@ public FullThreadPoolExecutorServiceImpl(string id) : base(id)
{
}
}
#endif

/// <summary>
/// INTERNAL API
Expand Down

0 comments on commit 7592725

Please sign in to comment.