mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-03 02:35:52 +03:00
gall: in +ap-doff, process oldest subs first
Start by killing subscription nonce 0, then work our way up instead of down. We enhance the printf with a "total nonces" indicator so we can still easily see the progress being made.
This commit is contained in:
parent
8033fe760e
commit
39cd895a55
@ -1778,15 +1778,21 @@
|
||||
=+ [wyr dok]=i.subs
|
||||
?: =(ship `ship.dok)
|
||||
$(subs t.subs)
|
||||
=/ let (~(got by boar.yoke) wyr dok)
|
||||
|- ^+ ap-core
|
||||
~> %slog.[0 leaf+"gall: +ap-doff {<[agent-name wyr dok let]>}"]
|
||||
=. ap-core (ap-pass [(scot %ud let) wyr] %agent dok %leave ~)
|
||||
?. =(0 let)
|
||||
$(let (dec let))
|
||||
:: kill old-style subscription wire with no nonce
|
||||
::
|
||||
=. ap-core (ap-pass wyr %agent dok %leave ~)
|
||||
:: kill new-style subscriptions at every previously-known nonce
|
||||
::
|
||||
=/ let (~(got by boar.yoke) wyr dok)
|
||||
=/ non 0
|
||||
|- ^+ ap-core
|
||||
%- =- (slog leaf+- ~)
|
||||
"gall: +ap-doff {<[agent-name wyr dok]>} {<non>}/{<,.let>}"
|
||||
=. ap-core (ap-pass [(scot %ud non) wyr] %agent dok %leave ~)
|
||||
?: (lth non let)
|
||||
$(non +(non))
|
||||
:: do the %kick last: leaves must be processed first
|
||||
::
|
||||
=. ap-core (ap-pass wyr %huck dok %b %huck [%gall %unto %kick ~])
|
||||
^$(subs t.subs)
|
||||
:: +ap-mule: run virtualized with intercepted scry, preserving type
|
||||
|
Loading…
Reference in New Issue
Block a user