Skip to content

Bug: DefaultMailbox.PostSystemMessage CancellationTokenDisposed exception #1916

@woksin

Description

@woksin

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:

  1. 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 😄 )
  2. 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 😆

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions