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

Make tokio::signal::windows::ctrl_c() public? #3178

Closed
niklasf opened this issue Nov 25, 2020 · 1 comment
Closed

Make tokio::signal::windows::ctrl_c() public? #3178

niklasf opened this issue Nov 25, 2020 · 1 comment
Assignees
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-signal Module: tokio/signal

Comments

@niklasf
Copy link
Contributor

niklasf commented Nov 25, 2020

There is already the platform independent tokio::signal::ctrl_c(), but it would be useful to have a stream analogous to tokio::signal::windows::ctrl_break() (which is already public).

It looks like the function already exists. Is there a reason to keep it private?

@niklasf niklasf added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Nov 25, 2020
@Darksonn Darksonn added the M-signal Module: tokio/signal label Nov 25, 2020
@ipetkov
Copy link
Member

ipetkov commented Nov 27, 2020

Hi @niklasf thanks for the report!

There's no strict reason why this wasn't exposed, seems like it was omitted because the cross platform ctrl_c exists, and so far no one has needed the stream version until now...

Happy to review a PR for the change if you're interested in submitting one!

@ipetkov ipetkov self-assigned this Nov 27, 2020
niklasf added a commit to niklasf/tokio that referenced this issue Nov 27, 2020
* Make tokio::signal::windows::ctrl_c() public.
* Stop referring to private tokio::signal::windows::Event in module
  documentation.
niklasf added a commit to niklasf/tokio that referenced this issue Nov 27, 2020
* Make tokio::signal::windows::ctrl_c() public.
* Stop referring to private tokio::signal::windows::Event in module
  documentation.
niklasf added a commit to niklasf/tokio that referenced this issue Nov 27, 2020
* Make tokio::signal::windows::ctrl_c() public.
* Stop referring to private tokio::signal::windows::Event in module
  documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-signal Module: tokio/signal
Projects
None yet
Development

No branches or pull requests

3 participants