Skip to content

Commit 2af290f

Browse files
rename easy.{ready => done}
Also eliminate try/catch around `wait(easy.done)` since it can't throw.
1 parent 2958934 commit 2af290f

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/Curl/Easy.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mutable struct Easy
22
handle :: Ptr{Cvoid}
33
input :: IO
4-
ready :: Threads.Event
4+
done :: Threads.Event
55
seeker :: Union{Function,Nothing}
66
output :: IO
77
progress :: Function

src/Curl/Multi.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function check_multi_info(multi::Multi)
8585
easy = unsafe_pointer_to_objref(easy_p_ref[])::Easy
8686
@assert easy_handle == easy.handle
8787
easy.code = message.code
88-
notify(easy.ready)
88+
notify(easy.done)
8989
else
9090
@async @error("curl_multi_info_read: unknown message", message)
9191
end

src/Downloads.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,8 @@ function request(
343343

344344
# do the request
345345
add_handle(downloader.multi, easy)
346-
try wait(easy.ready) # can this throw?
347-
finally
348-
remove_handle(downloader.multi, easy)
349-
end
346+
wait(easy.done)
347+
remove_handle(downloader.multi, easy)
350348

351349
# return the response or throw an error
352350
response = Response(get_response_info(easy)...)

0 commit comments

Comments
 (0)