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

Add a test for task state cleanup when Task are unscheduled #47871

Closed
wants to merge 1 commit into from

Conversation

NHDaly
Copy link
Member

@NHDaly NHDaly commented Dec 11, 2022

:) I figured it was nicer to actually commit the test rather than just suggesting it in a code comment.

Merges into #47829.

@brenhinkeller brenhinkeller added test This change adds or pertains to unit tests multithreading Base.Threads and related functionality labels Dec 11, 2022
@@ -322,6 +322,19 @@ close(proc.in)
end
end

@testset "threads clean up task local state" begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that in my tests in WorkerUtilities.jl, I couldn't get the task.code= nothing solution to work when the tests were run inside a @testset; I did a little digging, but couldn't figure out what was going on there. Possibly something related to how @testsets use task-local-storage maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 weirdly the tests passed here though, it seems?

@NHDaly
Copy link
Member Author

NHDaly commented Jan 2, 2023

@vchuravy: whatever solution you do end up with, can we try to incorporate this test case into it?

I'll close this PR for now.

@NHDaly NHDaly closed this Jan 2, 2023
@NHDaly NHDaly deleted the nhd/task_cleanup-test branch January 2, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multithreading Base.Threads and related functionality test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants