mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
aqua: make faster so moon-az can finish
This commit is contained in:
parent
67ff3e07c0
commit
51f9b2e269
@ -78,6 +78,8 @@
|
||||
^- step:agent:gall
|
||||
?: ?=([?(%effects %effect) ~] path)
|
||||
`this
|
||||
?: ?=([%effect @ ~] path)
|
||||
`this
|
||||
?. ?=([?(%effects %effect %evens %boths) @ ~] path)
|
||||
~| [%aqua-bad-subscribe-path path]
|
||||
!!
|
||||
@ -251,9 +253,12 @@
|
||||
%- zing
|
||||
%+ turn ~(tap by unix-effects)
|
||||
|= [=ship ufs=(list unix-effect)]
|
||||
%- zing
|
||||
%+ turn ufs
|
||||
|= uf=unix-effect
|
||||
[%give %fact `path %aqua-effect !>(`aqua-effect`[ship uf])]
|
||||
:~ [%give %fact `/effect %aqua-effect !>(`aqua-effect`[ship uf])]
|
||||
[%give %fact `/effect/[-.q.uf] %aqua-effect !>(`aqua-effect`[ship uf])]
|
||||
==
|
||||
::
|
||||
=. this
|
||||
=/ =path /effects
|
||||
|
@ -127,6 +127,9 @@
|
||||
|- ^- (quip card _this)
|
||||
?~ yarns
|
||||
`this
|
||||
?. ?=([@ ~] i.yarns)
|
||||
$(yarns t.yarns)
|
||||
~| killing=i.yarns
|
||||
=^ cards-1 state
|
||||
(handle-stop-thread:sc (yarn-to-tid i.yarns) |)
|
||||
=^ cards-2 this
|
||||
@ -136,6 +139,8 @@
|
||||
++ on-poke
|
||||
|= [=mark =vase]
|
||||
^- (quip card _this)
|
||||
?: ?=(%spider-kill mark)
|
||||
(on-load on-save)
|
||||
=^ cards state
|
||||
?+ mark (on-poke:def mark vase)
|
||||
%spider-input (on-poke-input:sc !<(input vase))
|
||||
|
@ -1,9 +1,11 @@
|
||||
/- aquarium
|
||||
=, aquarium
|
||||
:- %say
|
||||
|= [* [her=ship pax=path] ~]
|
||||
|= [* [her=ship pax=path ~] ~]
|
||||
:- %aqua-events :_ ~
|
||||
^- aqua-event:aquarium
|
||||
:+ %event her
|
||||
?> ?=([@ @ @ *] pax)
|
||||
=/ file [/text/plain (as-octs:mimes:html .^(@ %cx pax))]
|
||||
[//sync/0v1n.2m9vh %into i.t.pax | [t.t.t.pax `file]~]~
|
||||
:- //sync/0v1n.2m9vh
|
||||
[%into `desk`i.t.pax | `mode:clay`[t.t.t.pax `file]~]
|
||||
|
3
pkg/arvo/gen/spider/kill.hoon
Normal file
3
pkg/arvo/gen/spider/kill.hoon
Normal file
@ -0,0 +1,3 @@
|
||||
:- %say
|
||||
|= *
|
||||
[%spider-kill ~]
|
@ -16,12 +16,16 @@
|
||||
--
|
||||
::
|
||||
=; core
|
||||
|= handler=vane-handler
|
||||
|= [effect-filter=(list term) handler=vane-handler]
|
||||
^- thread:spider
|
||||
|= vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
;< ~ bind:m (watch-our:strandio /effects %aqua /effect)
|
||||
=* loop $
|
||||
?^ effect-filter
|
||||
=/ =path /effect/[i.effect-filter]
|
||||
;< ~ bind:m (watch-our:strandio path %aqua path)
|
||||
loop(effect-filter t.effect-filter)
|
||||
;< ~ bind:m
|
||||
%- (main-loop:strandio ,_handler)
|
||||
:~ handle-unix-effect:core
|
||||
|
@ -71,7 +71,8 @@
|
||||
?~ array
|
||||
~& %incomplete-batch
|
||||
(strand-fail:strandio %rpc-result-incomplete-batch >u.jon< ~)
|
||||
=- ?~ err (pure:m `res)
|
||||
=- ?~ err
|
||||
(pure:m `res)
|
||||
~& [%error-results err]
|
||||
(pure:m ~)
|
||||
%+ roll u.array
|
||||
|
@ -11,7 +11,7 @@
|
||||
++ take-unix-effect
|
||||
=/ m (strand ,[ship unix-effect])
|
||||
^- form:m
|
||||
;< =cage bind:m (take-fact /effects)
|
||||
;< [=path =cage] bind:m (take-fact-prefix /effect)
|
||||
?> ?=(%aqua-effect p.cage)
|
||||
(pure:m !<([aqua-effect] q.cage))
|
||||
::
|
||||
@ -35,7 +35,7 @@
|
||||
^- form:m
|
||||
~& > "starting"
|
||||
;< ~ bind:m (start-threads vane-threads)
|
||||
;< ~ bind:m (watch-our /effects %aqua /effect)
|
||||
;< ~ bind:m (watch-our /effect %aqua /effect)
|
||||
:: Get our very own event with no mistakes in it... yet.
|
||||
::
|
||||
:: We want to wait for the vane threads to actually start and get
|
||||
@ -55,7 +55,7 @@
|
||||
^- form:m
|
||||
~& > "done"
|
||||
;< ~ bind:m (stop-threads vane-threads)
|
||||
;< ~ bind:m (leave-our /effects %aqua)
|
||||
;< ~ bind:m (leave-our /effect %aqua)
|
||||
(pure:m ~)
|
||||
::
|
||||
++ start-threads
|
||||
|
@ -96,7 +96,7 @@
|
||||
?+ in.tin `[%skip ~]
|
||||
~ `[%wait ~]
|
||||
[~ %agent * %fact *]
|
||||
?. =(watch+wire (scag (lent wire) wire.u.in.tin))
|
||||
?. =(watch+wire (scag +((lent wire)) wire.u.in.tin))
|
||||
`[%skip ~]
|
||||
`[%done (slag (lent wire) wire.u.in.tin) cage.sign.u.in.tin]
|
||||
==
|
||||
|
@ -48,7 +48,7 @@
|
||||
[%| `address:ames``@`ship]
|
||||
--
|
||||
::
|
||||
%- aqua-vane-thread
|
||||
%+ aqua-vane-thread ~[%restore %send]
|
||||
|_ =bowl:spider
|
||||
+* this .
|
||||
++ handle-unix-effect
|
||||
|
@ -85,7 +85,7 @@
|
||||
--
|
||||
--
|
||||
::
|
||||
%- aqua-vane-thread
|
||||
%+ aqua-vane-thread ~[%sleep %restore %doze]
|
||||
|_ =bowl:spider
|
||||
+* this .
|
||||
++ handle-unix-effect
|
||||
|
@ -30,7 +30,7 @@
|
||||
~
|
||||
--
|
||||
::
|
||||
%- aqua-vane-thread
|
||||
%+ aqua-vane-thread ~[%blit]
|
||||
|_ =bowl:spider
|
||||
+* this .
|
||||
++ handle-unix-effect
|
||||
|
@ -22,7 +22,10 @@
|
||||
|= args=vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
;< ~ bind:m (watch-our:strandio /effects %aqua /effect)
|
||||
;< ~ bind:m (watch-our:strandio /effect/request %aqua /effect/request)
|
||||
:: need blits for raw-ship to check booted
|
||||
::
|
||||
;< ~ bind:m (watch-our:strandio /effect/blit %aqua /effect/blit)
|
||||
;< ~ bind:m
|
||||
%- (main-loop:strandio ,state)
|
||||
:~ |=(=state ~(handle-unix-effect core state))
|
||||
|
@ -100,7 +100,7 @@
|
||||
--
|
||||
--
|
||||
::
|
||||
%- aqua-vane-thread
|
||||
%+ aqua-vane-thread ~[%sleep %restore %thus]
|
||||
|_ =bowl:spider
|
||||
+* this .
|
||||
++ handle-unix-effect
|
||||
|
Loading…
Reference in New Issue
Block a user