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

Use wkspawn from ConcurrentUtilities instead of Threads.spawn #469

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Jun 13, 2023

Should fix #336.

For more context, see the same fix we made for this in CSV.jl.

Basically, objects interpolated into or returned from spawned tasks can be unexpectedly kept alive long after the task has finished and the object should have been garbage-collected due to individual threads holding the most recent task as a reference. Using @wkspawn ensures tasks themselves don't hold references to any of these once they're done executing.

Should fix #336.

For more context, see the [same fix](JuliaData/CSV.jl@077e177)
we made for this in CSV.jl.

Basically, objects interpolated into or returned from spawned tasks can
be unexpectedly kept alive long after the task has finished and the object
should have been garbage-collected due to individual threads holding
the most recent task as a reference. Using `@wkspawn` ensures tasks themselves
don't hold references to any of these once they're done executing.
@quinnj quinnj mentioned this pull request Jun 13, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2023

Codecov Report

Merging #469 (7052a7e) into main (fc7cc2d) will decrease coverage by 0.07%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main     #469      +/-   ##
==========================================
- Coverage   87.56%   87.50%   -0.07%     
==========================================
  Files          26       26              
  Lines        3280     3280              
==========================================
- Hits         2872     2870       -2     
- Misses        408      410       +2     
Impacted Files Coverage Δ
src/append.jl 91.01% <50.00%> (-1.13%) ⬇️
src/write.jl 97.56% <50.00%> (-0.31%) ⬇️
src/table.jl 92.49% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@quinnj quinnj merged commit f8d2203 into main Jun 14, 2023
@quinnj quinnj deleted the jq-wkspawn branch June 14, 2023 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid argument error
3 participants