avoid Core.Box in the package#161
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #161 +/- ##
==========================================
+ Coverage 79.34% 79.41% +0.07%
==========================================
Files 10 10
Lines 1951 1953 +2
==========================================
+ Hits 1548 1551 +3
+ Misses 403 402 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| (port, sock) = listenany(interface, UInt16(port_hint)) | ||
| LPROC.bind_port = port | ||
| sock |
There was a problem hiding this comment.
| (port, sock) = listenany(interface, UInt16(port_hint)) | |
| LPROC.bind_port = port | |
| sock | |
| let (port, sock) = listenany(interface, UInt16(port_hint)) | |
| LPROC.bind_port = port | |
| sock | |
| end |
but might not be needed
| let sock_local = sock | ||
| errormonitor(@async while isopen(sock_local) | ||
| client = accept(sock_local) | ||
| process_messages(client, client, true) | ||
| end) | ||
| end |
There was a problem hiding this comment.
| let sock_local = sock | |
| errormonitor(@async while isopen(sock_local) | |
| client = accept(sock_local) | |
| process_messages(client, client, true) | |
| end) | |
| end | |
| let sock = sock | |
| errormonitor(@async while isopen(sock) | |
| client = accept(sock) | |
| process_messages(client, client, true) | |
| end) | |
| end |
just for clarity, since it is the same underlying object ultimately
| try | ||
| (r_s, w_s) = connect(manager, w.id, wconfig) | ||
| (r_s, w_s) = connect(manager, w_stub.id, wconfig) | ||
| catch ex | ||
| try | ||
| deregister_worker(w.id) | ||
| kill(manager, w.id, wconfig) | ||
| deregister_worker(w_stub.id) | ||
| kill(manager, w_stub.id, wconfig) | ||
| finally | ||
| rethrow(ex) | ||
| end | ||
| end |
There was a problem hiding this comment.
| try | |
| (r_s, w_s) = connect(manager, w.id, wconfig) | |
| (r_s, w_s) = connect(manager, w_stub.id, wconfig) | |
| catch ex | |
| try | |
| deregister_worker(w.id) | |
| kill(manager, w.id, wconfig) | |
| deregister_worker(w_stub.id) | |
| kill(manager, w_stub.id, wconfig) | |
| finally | |
| rethrow(ex) | |
| end | |
| end | |
| r_s, w_s = try | |
| connect(manager, w_stub.id, wconfig) | |
| catch ex | |
| try | |
| deregister_worker(w_stub.id) | |
| kill(manager, w_stub.id, wconfig) | |
| finally | |
| rethrow(ex) | |
| end | |
| end |
| # initiate a connect. Does not wait for connection completion in case of TCP. | ||
| w = Worker() | ||
| w_stub = Worker() | ||
| local r_s, w_s |
There was a problem hiding this comment.
| local r_s, w_s |
|
Updated |
|
bump |
| local r_s, w_s | ||
| try | ||
| (r_s, w_s) = connect(manager, w.id, wconfig) | ||
| w_stub = Worker() |
There was a problem hiding this comment.
For this and the socket case above, would setting the type of the variable also fix the boxing? e.g.:
| w_stub = Worker() | |
| w::Worker = Worker() |
There was a problem hiding this comment.
Out of curiosity, why not?
BTW, in almost every interaction I've had with people giving one word replies (which is quite a lot in the Julia community for some reason) I end up having to ask more clarifying questions and the whole process takes much more time than it would have taken to have written a proper answer in the first place. Spending less time communicating is not more efficient 😅
This is such a useless thing to enable on a repo. |
This has also annoyed me a lot, can you disable it? |
I've disabled that setting |
|
I see that this was approved, but not merged. @JamesWrigley Can I merge this PR? Or is there more reviewing to do? |
|
I think you can merge it 👍 |
Fixes the Distributed part of JuliaLang/julia#60479, namely:
x#remotecall_pool#130Tuple{Distributed.var"##remotecall_pool#130", Base.Pairs{Symbol, V, Nothing, NT} where {V, NT<:NamedTuple}, typeof(Distributed.remotecall_pool), typeof(Distributed.remotecall), Any, Distributed.AbstractWorkerPool, Vararg{Any}}/home/kc/julia/usr/share/julia/stdlib/v1.14/Distributed/src/workerpool.jl:140x#remotecall_pool#154Tuple{Distributed.var"##remotecall_pool#154", Base.Pairs{Symbol, V, Nothing, NT} where {V, NT<:NamedTuple}, typeof(Distributed.remotecall_pool), typeof(Distributed.remotecall), Any, Distributed.CachingPool, Vararg{Any}}/home/kc/julia/usr/share/julia/stdlib/v1.14/Distributed/src/workerpool.jl:407sock#start_worker#24Tuple{Distributed.var"##start_worker#24", Bool, Bool, typeof(Distributed.start_worker), IO, AbstractString}/home/kc/julia/usr/share/julia/stdlib/v1.14/Distributed/src/cluster.jl:237wcreate_workerTuple{typeof(Distributed.create_worker), Any, Any}/home/kc/julia/usr/share/julia/stdlib/v1.14/Distributed/src/cluster.jl:601I couldn't run the tests locally because I immidiately hit: