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

Base.Threads: copy __source__ LineInfo into closure for @spawn/@async #49488

Merged
merged 2 commits into from
May 5, 2023

Conversation

topolarity
Copy link
Member

@topolarity topolarity commented Apr 24, 2023

This makes it much easier to differentiate between @spawn/@async tasks:

image
versus before:

image

@vtjnash
Copy link
Member

vtjnash commented Apr 24, 2023

It is usually better to modify the AST, not mutate the internals later. (c.f. Base.remove_linenums! perhaps)

@topolarity
Copy link
Member Author

That sounds like a much better approach. I'll look into it

@topolarity topolarity force-pushed the smuggle-task-lineinfo branch from e47c5cc to 42e4caa Compare April 25, 2023 19:50
@topolarity topolarity requested a review from vtjnash May 2, 2023 15:55
@KristofferC
Copy link
Member

KristofferC commented May 4, 2023

Rebased

topolarity added 2 commits May 4, 2023 13:15
This is useful for profilers such as Tracy which need to give a distinguishing
name to different tasks. Another useful thing would be to accept an optional
`name` parameter in these macros, but that's left for future work.
This provides a generic entrypoint to initialize any task-specific handles
or metadata for profiling back-ends. This change also adds the Module
name to the Task name.
@KristofferC KristofferC force-pushed the smuggle-task-lineinfo branch from 42e4caa to 99e194f Compare May 4, 2023 11:17
@KristofferC KristofferC added the merge me PR is reviewed. Merge when all tests are passing label May 4, 2023
@KristofferC KristofferC merged commit 356c746 into JuliaLang:master May 5, 2023
@oscardssmith oscardssmith removed the merge me PR is reviewed. Merge when all tests are passing label May 5, 2023
@topolarity topolarity deleted the smuggle-task-lineinfo branch May 5, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants