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

Documentation inconsistency concerning @async #50356

Open
algunion opened this issue Jun 29, 2023 · 1 comment
Open

Documentation inconsistency concerning @async #50356

algunion opened this issue Jun 29, 2023 · 1 comment
Labels
docs This change adds or pertains to documentation

Comments

@algunion
Copy link

algunion commented Jun 29, 2023

The @async macro documentation includes the following warning:

It is strongly encouraged to favor Threads.@spawn over @async always even when no parallelism is required especially in publicly distributed libraries. This is because a use of @async disables the migration of the parent task across worker threads in the current implementation of Julia. Thus, seemingly innocent use of @async in a library function can have a large impact on the performance of very different parts of user applications.

However, the asynchronous programming piece of the manual presents @async as a legitimate way to do things - and @async is even used in the how-to related to Channels. Take a look here and in general to the asynchronous programming section of the manual.

From the timestamps, it seems that the asynchronous programming section of the manual might be outdated - and is basically suggesting practices that are labeled as to be avoided in other parts of the documentation.

I also opened a topic on discourse, but it didn't grab much attention.

Is the @async/@swap warning still standing and the manual is to be updated? Or the other way around?

@vchuravy
Copy link
Member

The manual needs to be updated.

cc: @carstenbauer since we talked about this recently.

@brenhinkeller brenhinkeller added the docs This change adds or pertains to documentation label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

3 participants