Skip to content

Commit

Permalink
Fixed some internal-dispatcher usages (#4995)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Stannard <aaron@petabridge.com>
  • Loading branch information
ismaelhamed and Aaronontheweb authored May 5, 2021
1 parent f591c58 commit bfcb703
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
17 changes: 10 additions & 7 deletions src/core/Akka.Cluster/ClusterRemoteWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Collections.Immutable;
using System.Linq;
using Akka.Actor;
using Akka.Dispatch;
using Akka.Remote;

namespace Akka.Cluster
Expand All @@ -31,19 +32,21 @@ internal class ClusterRemoteWatcher : RemoteWatcher
/// <param name="heartbeatInterval">TBD</param>
/// <param name="unreachableReaperInterval">TBD</param>
/// <param name="heartbeatExpectedResponseAfter">TBD</param>
public static Props Props(
public new static Props Props(
IFailureDetectorRegistry<Address> failureDetector,
TimeSpan heartbeatInterval,
TimeSpan unreachableReaperInterval,
TimeSpan heartbeatExpectedResponseAfter)
{
return new Props(typeof(ClusterRemoteWatcher), new object[]
{
failureDetector,
heartbeatInterval,
unreachableReaperInterval,
heartbeatExpectedResponseAfter
}).WithDeploy(Deploy.Local);
{
failureDetector,
heartbeatInterval,
unreachableReaperInterval,
heartbeatExpectedResponseAfter
})
.WithDispatcher(Dispatchers.InternalDispatcherId)
.WithDeploy(Deploy.Local);
}

private readonly Cluster _cluster;
Expand Down
1 change: 1 addition & 0 deletions src/core/Akka.Remote/RemoteWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static Props Props(
TimeSpan heartbeatExpectedResponseAfter)
{
return Actor.Props.Create(() => new RemoteWatcher(failureDetector, heartbeatInterval, unreachableReaperInterval, heartbeatExpectedResponseAfter))
.WithDispatcher(Dispatchers.InternalDispatcherId)
.WithDeploy(Deploy.Local);
}

Expand Down
3 changes: 2 additions & 1 deletion src/core/Akka/Event/EventBusUnsubscriber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Akka.Actor;
using Akka.Actor.Internal;
using Akka.Annotations;
using Akka.Dispatch;
using Akka.Util.Internal;

namespace Akka.Event
Expand Down Expand Up @@ -176,7 +177,7 @@ public static EventStreamUnsubscribersProvider Instance
/// <param name="debug">TBD</param>
public void Start(ActorSystemImpl system, EventStream eventStream, bool debug)
{
system.SystemActorOf(Props.Create<EventStreamUnsubscriber>(eventStream, system, debug),
system.SystemActorOf(Props.Create<EventStreamUnsubscriber>(eventStream, system, debug).WithDispatcher(Dispatchers.InternalDispatcherId),
string.Format("EventStreamUnsubscriber-{0}", _unsubscribersCounter.IncrementAndGet()));
}
}
Expand Down

0 comments on commit bfcb703

Please sign in to comment.