-
-
Notifications
You must be signed in to change notification settings - Fork 626
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(core): remove blocking to avoid deadlock for multi compiler #9587
Conversation
✅ Deploy Preview for rspack canceled.
|
CodSpeed Performance ReportMerging #9587 will not alter performanceComparing 🎉 Hooray!
|
📝 Benchmark detail: Open
|
📝 Benchmark detail: Open
|
📝 Benchmark detail: Open task failure |
Summary
FutureResults will call blocking_in_place to support non
'static
future parallel, but if there're multi compilers call it multi times, it will cause all tokio runtime working blocking and other spawned task can't be scheduled, which will cause deadlock.Unfortunately there're no safe way to implement parallel future which is proved in https://tmandry.gitlab.io/blog/posts/2023-03-01-scoped-tasks/
so we need choose use unsafe code or sacrifice parallel(which means sacrifice performance), for us performance is important so I choose use unsafe code.
Checklist