Skip to content

Commit

Permalink
Merge pull request #697 from HCanber/revert-parts-of-691
Browse files Browse the repository at this point in the history
Revert parts of #691 "refactor suspend children"
  • Loading branch information
rogeralsing committed Mar 1, 2015
2 parents df0c021 + b509686 commit a4c1ada
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/core/Akka/Actor/ActorCell.Children.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Akka.Actor.Internal;
using Akka.Util;
Expand Down Expand Up @@ -198,12 +197,23 @@ protected void SetTerminated()
/// </summary>
private void SuspendChildren(List<ActorRef> exceptFor = null)
{
var except = exceptFor ?? Enumerable.Empty<ActorRef>();
(from s in ChildrenContainer.Stats
where !except.Contains(s.Child)
select s.Child)
.ToList()
.ForEach(c => c.Suspend());
if (exceptFor == null)
{
foreach (var stats in ChildrenContainer.Stats)
{
var child = stats.Child;
child.Suspend();
}
}
else
{
foreach (var stats in ChildrenContainer.Stats)
{
var child = stats.Child;
if (!exceptFor.Contains(child))
child.Suspend();
}
}
}

/// <summary>
Expand Down

2 comments on commit a4c1ada

@Petabridge-CI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity Akka.NET :: Akka.NET PR Build Build 80 is now running

@Petabridge-CI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity Akka.NET :: Akka.NET PR Build Build 80 outcome was FAILURE
Summary: System.Exception: xUnit failed for the following assemblies: D:\BuildAgent\work\49b164d63843fb4\src\core\Akka.Persistence.Tests\bin\Release\Akka.Persistence.Tests.dll at Microsoft.FSharp.Core.Operators.FailWith[T](String message) at Fake.XUnitHel... Build time: 00:10:52

Failed tests

Akka.Persistence.Tests.dll: Akka.Persistence.Tests.GuaranteedDeliveryCrashSpec.GuaranteedDelivery_should_not_send_when_actor_crashes: <no details avaliable>

Please sign in to comment.