Skip to content

Revise.revise(...) is not safe to be called from multiple threads simultaneously #845

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

Closed
frankier opened this issue Sep 23, 2024 · 0 comments · Fixed by #846
Closed

Revise.revise(...) is not safe to be called from multiple threads simultaneously #845

frankier opened this issue Sep 23, 2024 · 0 comments · Fixed by #846

Comments

@frankier
Copy link

Revise.revise(...) appears to not be threadsafe. Typically it is only run from a single thread, and only ever one-at-a-time, e.g. in the REPL. However, it is possible it could be called from multiple threads (e.g. in a webserver). In this case, the reading and writing of the global revision_queue without locks could cause inconsistent/corrupt reads (build-in data structures are not threadsafe). As a secondary problem, there is a thundering herd issue where work could be duplicated between Revise passes started at the same time.

timholy added a commit that referenced this issue Sep 24, 2024
timholy added a commit that referenced this issue Sep 25, 2024
timholy added a commit that referenced this issue Sep 25, 2024
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 a pull request may close this issue.

1 participant