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

Expose actix::ContextFut::restart to public API #567

Merged
merged 6 commits into from
Feb 1, 2024

Conversation

50U10FCA7
Copy link
Contributor

PR Type

Feature

PR Checklist

Check your PR fulfills the following:

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt

Overview

Motivation

Making possible to implement custom actix::Supervisor types.

Problem

actix::Supervisor does not allow to shutdown an actix::Actor it supervising. In this case a custom actix::Supervisor should be implemented by the user to satisfy it needs (graceful shutdown of a supervised actix::Actor via Supervisor::shutdown in my case for example). But there is no way to implement a custom actix::Supervisor type because actix::ContextFut::restart is crate-local and can't be used in usercode.

Solution

Make actix::ContextFut::restart public.

@robjtede robjtede added the A-actix Crate: actix label Sep 12, 2023
actix/CHANGES.md Outdated Show resolved Hide resolved
actix/src/contextimpl.rs Show resolved Hide resolved
@50U10FCA7
Copy link
Contributor Author

@robjtede Can you please check the changes?

@50U10FCA7
Copy link
Contributor Author

@robjtede Any updates on this PR?

@50U10FCA7
Copy link
Contributor Author

Merged the last changes from master.

@50U10FCA7
Copy link
Contributor Author

@robjtede Can you review this PR please?

@50U10FCA7
Copy link
Contributor Author

@robjtede ping

Copy link
Member

@robjtede robjtede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, apologies for the delay 👍🏻

@robjtede robjtede added this pull request to the merge queue Feb 1, 2024
Merged via the queue into actix:master with commit 35cb05b Feb 1, 2024
9 checks passed
wthrk pushed a commit to wthrk/actix that referenced this pull request Mar 13, 2024
* Expose `ContextFut::restart`

* Corrections

* `CHANGES.md` corrections

* Docs corrections

---------

Co-authored-by: 50U10FCA7 <m.bashilov.srg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-actix Crate: actix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants