mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 21:12:56 +03:00
cfc1a58559
Prevously we were tracking remote scry requests using a map, assuming that every thread would do just one remote scry request. This is not right. A thread that did multiple +keen:strandio was treated as if just the last call existed, overwritten previous entries in the map. Now we track remote scries using a jug that accounts for multiple %keen tasks per thread. The logic for sending %yawns to %ames has been updated for the following scenarios: - +thread-fail will always send a %yawn task - +thread-done doesn't send %yawn tasks - unless a running thread is stopped - if %spider is reloaded: - %yawn tasks will be sent for any running or starting thread /lib/strandio also removes +take-tune from +keen, decoupling sending %tasks and receiving %signs. This allows for clients to request multiple paths at future cases, without blocking.
26 lines
611 B
Plaintext
26 lines
611 B
Plaintext
/- spider
|
|
/+ strandio
|
|
=, strand=strand:spider
|
|
^- thread:spider
|
|
|= arg=vase
|
|
=/ m (strand ,vase)
|
|
^- form:m
|
|
=+ !<([~ =spar:ames] arg)
|
|
;< ~ bind:m
|
|
(keen:strandio /keen spar)
|
|
;< [* roar=(unit roar:ames)] bind:m
|
|
(take-tune:strandio /keen)
|
|
?~ roar
|
|
(pure:m !>(~))
|
|
?~ data=q.dat.u.roar
|
|
(pure:m !>(~))
|
|
::
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
|
=+ .^ =dais:clay %cb
|
|
/(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/[p.u.data]
|
|
==
|
|
=/ res (mule |.((vale.dais q.u.data)))
|
|
?. ?=(%| -.res)
|
|
(pure:m p.res)
|
|
~|(%keen-mark-fail (mean leaf+"-keen: ames vale fail {<mark>}" p.res))
|