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

rustdoc: Ensure that all files have been written on windows before exiting #109134

Conversation

GuillaumeGomez
Copy link
Member

Fixes #109060.

I originally wanted to use rayon::in_scope to ensure that all threads would be waited once we're out, however it adds to many restrictions and requires to keep a &rayon::Scope around, making it quite tricky to use unfortunately.

So what remains is the classical ways to sync with threads. With this implementation though, if a thread crashes for whatever reason, we simply won't know and rustdoc will wait forever, which is pretty bad.

So if anyone has suggestions for improving this, it'd be very welcome.

In the meantime:

r? @ehuss

@GuillaumeGomez GuillaumeGomez changed the title Ensure that all files have been written on windows before exiting rustdoc: Ensure that all files have been written on windows before exiting Mar 14, 2023
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 14, 2023
@GuillaumeGomez
Copy link
Member Author

Just discovered thread_pool, I'll open another PR. Closing this one.

@GuillaumeGomez GuillaumeGomez deleted the rustdoc-windows-wait-for-write branch March 14, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustdoc does not wait for DocFS writes to complete before exiting on Windows
3 participants