-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Version Information
Version of Akka.NET? dev, v1.5
Which Akka.NET Modules? Akka core
Describe the bug
This .NET 10 breaking change will break CoordinatedShutdown: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/sigterm-signal-handler
Right now, we're using AppDomain.ProcessExit event handler to detect CLR shutdown:
akka.net/src/core/Akka/Actor/CoordinatedShutdown.cs
Lines 723 to 727 in a548374
| AppDomain.CurrentDomain.ProcessExit += exitTask; | |
| system.WhenTerminated.ContinueWith(_ => | |
| { | |
| AppDomain.CurrentDomain.ProcessExit -= exitTask; | |
| }); |
Note that this bug only applies to application that uses Akka directly, this does not affect Akka.Hosting implementation because Akka.Hosting relies on application lifecycle signals to shut down Akka instead of hooking onto the CLR signal directly.