Skip to content

Commit

Permalink
close #4099 - made ActorSystem.Dispose method block until WhenTermina…
Browse files Browse the repository at this point in the history
…ted.IsComplete == true (#4105)
  • Loading branch information
Aaronontheweb committed Dec 20, 2019
1 parent 58076c3 commit a389364
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/core/Akka/Actor/ActorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,6 @@ private static ActorSystem CreateAndStartSystem(string name, Config withFallback

private bool _isDisposed; //Automatically initialized to false;

//Destructor:
//~ActorSystem()
//{
// // Finalizer calls Dispose(false)
// Dispose(false);
//}

/// <inheritdoc/>
public void Dispose()
{
Expand All @@ -244,7 +237,7 @@ private void Dispose(bool disposing)
if (disposing)
{
Log.Debug("Disposing system");
Terminate();
Terminate().Wait(); // System needs to be disposed before method returns
}
//Clean up unmanaged resources
}
Expand Down

0 comments on commit a389364

Please sign in to comment.