aqua: make faster so moon-az can finish

This commit is contained in:
Philip Monk 2019-12-03 23:53:42 -08:00
parent 67ff3e07c0
commit 51f9b2e269
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
13 changed files with 38 additions and 15 deletions

View File

@ -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

View File

@ -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))

View File

@ -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]~]

View File

@ -0,0 +1,3 @@
:- %say
|= *
[%spider-kill ~]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]
==

View File

@ -48,7 +48,7 @@
[%| `address:ames``@`ship]
--
::
%- aqua-vane-thread
%+ aqua-vane-thread ~[%restore %send]
|_ =bowl:spider
+* this .
++ handle-unix-effect

View File

@ -85,7 +85,7 @@
--
--
::
%- aqua-vane-thread
%+ aqua-vane-thread ~[%sleep %restore %doze]
|_ =bowl:spider
+* this .
++ handle-unix-effect

View File

@ -30,7 +30,7 @@
~
--
::
%- aqua-vane-thread
%+ aqua-vane-thread ~[%blit]
|_ =bowl:spider
+* this .
++ handle-unix-effect

View File

@ -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))

View File

@ -100,7 +100,7 @@
--
--
::
%- aqua-vane-thread
%+ aqua-vane-thread ~[%sleep %restore %thus]
|_ =bowl:spider
+* this .
++ handle-unix-effect