-
Notifications
You must be signed in to change notification settings - Fork 84
fix: Move logic into the thread::scope call so it doesn't hang #1040
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
fix: Move logic into the thread::scope call so it doesn't hang #1040
Conversation
abe5d9f
to
eec4c58
Compare
// have handed out all copies needed, drop so record_batch_rx will exit when the last thread is | ||
// done sending | ||
drop(record_batch_tx); | ||
// have handed out all copies needed, drop so record_batch_rx will exit when the last thread is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're seeing this comment as being on a change, turn on "Hide Whitespace"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yikes! thanks for the fix. sorry i missed that! maybe we should have example “tests” that run examples to make sure they work? (not to solve here but maybe as follow up)
264f456
to
c12f44f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1040 +/- ##
=======================================
Coverage 83.74% 83.74%
=======================================
Files 92 92
Lines 21070 21070
Branches 21070 21070
=======================================
Hits 17646 17646
Misses 2509 2509
Partials 915 915 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What changes are proposed in this pull request?
Previously in #957 we moved the code to use
thread::scope
. This allows not having to clone an engine arc, but also means that all the threads are implicitly joined at the end of thescope
call.This meant that we waited for the threads to exit before ever sending them any work, so the version on main hangs 😱 .
Instead we need to move all the rest of the logic inside the scope call and only let the implicit joining happen at the end.
How was this change tested?
Running the program on a few tables