Skip to content

Commit

Permalink
faster send loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubwro committed Oct 2, 2023
1 parent 161bf09 commit 05e280c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/connection/reconnect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ function reconnect(nc::Connection, host, port, con_msg)
end)
Base.Threads._spawn_set_thrpool(receiver_task, :default)
Base.Threads.schedule(receiver_task)
sender_task = Threads.@spawn :default disable_sigint() do; sendloop(nc, write_stream) end
sender_task = Threads.Task(() -> sendloop(nc, write_stream))
Base.Threads._spawn_set_thrpool(sender_task, :default)
Base.Threads.schedule(sender_task)

c = Channel()
bind(c, receiver_task)
Expand Down

0 comments on commit 05e280c

Please sign in to comment.