Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PinnedDispatcher fixes + dispatcher teardown capabilities across all dispatchers #860

Merged
merged 1 commit into from
Apr 16, 2015

Conversation

Aaronontheweb
Copy link
Member

resolves #850

Also added the following methods to all MessageDispatcher instances:

/// <summary>
        /// Attaches the dispatcher to the <see cref="ActorCell"/>
        /// 
        /// <remarks>
        /// Practically, doesn't do very much right now - dispatchers aren't responsible for creating
        /// mailboxes in Akka.NET
        /// </remarks>
        /// </summary>
        /// <param name="cell">The ActorCell belonging to the actor who's attaching to this dispatcher.</param>
        public virtual void Attach(ActorCell cell)
        {

        }

        /// <summary>
        /// Detaches the dispatcher to the <see cref="ActorCell"/>
        /// 
        /// <remarks>
        /// Only really used in dispatchers with 1:1 relationship with dispatcher.
        /// </remarks>
        /// </summary>
        /// <param name="cell">The ActorCell belonging to the actor who's deatching from this dispatcher.</param>
        public virtual void Detach(ActorCell cell)
        {

        }

These are the default implementations, which no-op. But for dispatchers that share a 1:1 relationship with actors there's actual teardown code involved.

Both of these methods get called when the ActorCell is created (ActorCell.Init()) and terminated (ActorCell.FinishTerminate).

Aaronontheweb added a commit that referenced this pull request Apr 16, 2015
PinnedDispatcher fixes + dispatcher teardown capabilities across all dispatchers
@Aaronontheweb Aaronontheweb merged commit dc23ba9 into akkadotnet:dev Apr 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PinnedDispatcher - uses single thread for all actors instead of creating persanal thread for every actor
1 participant