-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Unexpected multi-threading issues on Julia 1.8.5 #49035
Comments
IOBuffer cannot be used for IO (edit: of process output). There is an open issue for me to implement an error for it. |
I see. So, the issue is that there is no mechanism to lock the IOBuffer, as essentially the main Julia process and the external command are two distinct threads both operating on it, which is inherently thread-unsafe? Closing this issue. Is there a thread-safe alternative for an in-memory buffer I can use? |
|
For future references: The solution is #42424, possibly with a reference from the |
This might be me not understand that I do something thread-unsafe. Here is a small example, which should be run with 8 threads:
And I get
Adding
sleep(1)
after the command makes the issue go away. Removing thecopy
makes the issue go away.This to me suggests that the
run
command wrongly reports it's finished before the data is actually inside theIOBuffer
.The text was updated successfully, but these errors were encountered: