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

Documenting the fact that the sync module is runtime agnostic #6832

Closed
jofas opened this issue Sep 7, 2024 · 1 comment · Fixed by #6833
Closed

Documenting the fact that the sync module is runtime agnostic #6832

jofas opened this issue Sep 7, 2024 · 1 comment · Fixed by #6833
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug. M-sync Module: tokio/sync T-docs Topic: documentation

Comments

@jofas
Copy link
Contributor

jofas commented Sep 7, 2024

In this URLO topic, OP is looking for a runtime agnostic channel implementation supporting both sync and async operations. I remembered reading somewhere that everything in the sync module is runtime agnostic.1 I expected this to be stated in the documentation of the sync module, but alas, only in the sync::mpsc module the docs mention that the channel is runtime agnostic.

In response to the above-mentioned URLO topic and #4232, I was wondering if the docs could be improved to make it clearer that everything in sync is runtime agnostic, not just the mpsc channel. For me a small section in the docs of the sync module would've been sufficient, but of course, this is just a suggestion and there might be better ways to document what parts of Tokio are runtime agnostic and what parts aren't.

FYI I'd be interested in whipping up a PR if this is a desired fix and there is consensus on what should be documented and where to put it.

Footnotes

  1. Barring one exception.

@jofas jofas added A-tokio Area: The main tokio crate C-bug Category: This is a bug. labels Sep 7, 2024
@Darksonn Darksonn added T-docs Topic: documentation M-sync Module: tokio/sync labels Sep 7, 2024
@Darksonn
Copy link
Contributor

Darksonn commented Sep 7, 2024

I think it would be great to have a section in the sync module docs about runtime compatibility.

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-bug Category: This is a bug. M-sync Module: tokio/sync T-docs Topic: documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants