I see that sometimes when running tests (for instance here https://github.com/asynkron/protoactor-dotnet/actions/runs/4042463067/jobs/6950198101#step:6:111 )
that the DefaultMailbox.PostSystemMessage can throw an exception when the _invoker.CancellationTokenSource is disposed.
This leads ne to the questions:
- Why is this
CancellationTokenSourceeven exposes as an API? (I don't know if there are any reason to why, if so then it would be nice to know 😄 )
- Why doesn't the
IMessageInvoker itself take the responsibility of cancelling its CancellationTokenSource as part of the Disposing it will eventually do whenever the ActorContext FinalizeStopAsync is inevitably called?
And please excuse my ignorance. I'm fairly new to this project and especially the code base 😆