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

Threads.@spawn instead of @async for handling server messages? #71

Open
fonsp opened this issue Jan 16, 2024 · 1 comment · May be fixed by #86
Open

Threads.@spawn instead of @async for handling server messages? #71

fonsp opened this issue Jan 16, 2024 · 1 comment · May be fixed by #86
Labels
enhancement New feature or request

Comments

@fonsp
Copy link
Member

fonsp commented Jan 16, 2024

@async begin

Should this be Threads.@spawn?

@devmotion
Copy link

Based on the warning in the Julia docs I think ideally all @async should be replaced with Threads.@spawn?

  │ 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.

@devmotion devmotion linked a pull request Oct 11, 2024 that will close this issue
@fonsp fonsp added the enhancement New feature or request label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants