-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Avoid potential race between read and upload_data #231
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #231 +/- ##
==========================================
- Coverage 90.26% 89.93% -0.34%
==========================================
Files 5 5
Lines 575 576 +1
==========================================
- Hits 519 518 -1
- Misses 56 58 +2
|
Do you have an example? That sounds like a much more severe data race than this change would fix, but I don't see how you could encounter that situation, since |
So I've hit this in the IO thread PR by just doing using Downloads
url = "https://httpbingo.julialang.org/put"
file = tempname()
write(file, "Hello, world!")
resp = nothing
body = sprint() do output
resp = request(url; output=output, input=file)
end I'm still grasping my way around this codebase, but I don't see a way that read_callbacks is forced to run after upload_data has run. It might also be a bug on the IO thread PR, but the other issues i've seen so far are those that use the running of the IO Loop as an implicit synchronization step. |
We discussed this during the multi-threading WG call. I just tested locally and it looks good. |
@StefanKarpinski this looks good on Base CI. |
I guess we don't backport to 1.6 then. This becomes a fix only for newer versions. |
So should I just remove the CI for 1.3? Or do you want a |
upload_data
might seteasy.input
to nothing before it's actually read ifread_callbacks
runs before it.