Skip to content

Commit

Permalink
use reset on Event if available
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaykm committed Sep 5, 2024
1 parent ec534b6 commit e449925
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Curl/Easy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ function upload_data(easy::Easy, input::IO)
curl_easy_pause(easy.handle, Curl.CURLPAUSE_CONT)
wait(easy.ready)
easy.input === nothing && break
reset(easy.ready)
if hasmethod(reset, (Base.Event,))
reset(easy.ready)
else
easy.ready = Threads.Event()
end
end
end

Expand Down

0 comments on commit e449925

Please sign in to comment.