mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-26 00:12:28 +03:00
khan: accepts thread arguments with marks
This commit is contained in:
parent
8ad57d8bd2
commit
425bf6b011
@ -2093,22 +2093,25 @@
|
||||
-- :: pki
|
||||
-- :: jael
|
||||
:: ::::
|
||||
:::: ++khan :: (1i) threads
|
||||
:::: ++khan :: (1i) threads
|
||||
:: ::::
|
||||
++ khan ^?
|
||||
|%
|
||||
+$ gift :: out result <-$
|
||||
$% [%avow p=(each [mark noun] [term tang])] :: thread result
|
||||
==
|
||||
$% [%avow p=(each (cask) goof)] :: thread result
|
||||
== ::
|
||||
+$ task :: in request ->$
|
||||
$~ [%vega ~]
|
||||
$~ [%vega ~] ::
|
||||
$% $>(%born vane-task) :: new unix process
|
||||
[%done ~] :: socket closed
|
||||
[%fyrd =desk name=term data=*] :: run thread v0
|
||||
[%fyrd p=fyrd] :: run thread
|
||||
$>(%trim vane-task) :: trim state
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
==
|
||||
-- :: khan
|
||||
== ::
|
||||
:: ::
|
||||
+$ bear $@(=desk [=desk =case]) :: local desk/case
|
||||
+$ fyrd [=bear name=term =mark data=(cask)] :: run-thread request
|
||||
-- ::khan
|
||||
::
|
||||
+$ gift-arvo :: out result <-$
|
||||
$~ [%doze ~]
|
||||
|
@ -53,24 +53,23 @@
|
||||
%born
|
||||
[~ khan-gate(unix-duct hen)]
|
||||
%fyrd
|
||||
:: start the thread on %spider.
|
||||
::
|
||||
=/ wir=wire (head hen)
|
||||
=/ rid=@ta (rear wir)
|
||||
:: XX what if the client sends a duplicate rid?
|
||||
:: is this fine? should we inject some randomness?
|
||||
::
|
||||
=* fyd p.task
|
||||
=/ tid=@ta
|
||||
(cat 3 'khan-fyrd--' rid)
|
||||
=/ =beak
|
||||
?@(bear.fyd [our bear.fyd %da now] [our bear.fyd])
|
||||
=/ =dais:clay
|
||||
?~ ret=(rof ~ %cb beak /[p.data.fyd])
|
||||
~|(%mark-unknown !!)
|
||||
?~ u.ret
|
||||
~|(%mark-invalid !!)
|
||||
?> =(%dais p.u.u.ret)
|
||||
!<(dais:clay q.u.u.ret)
|
||||
=/ args
|
||||
:* ~ `tid [our desk.task %da now] name.task
|
||||
:: XX can't do this:
|
||||
::
|
||||
:: !>(data.task)
|
||||
::
|
||||
:: special case for -hi:
|
||||
::
|
||||
!>(;;([~ arg=$@(who=ship [who=ship mez=tape])] data.task))
|
||||
:* ~ `tid beak name.fyd
|
||||
(vale.dais q.data.fyd)
|
||||
==
|
||||
=/ start-moves=(list move)
|
||||
%+ turn
|
||||
|
Loading…
Reference in New Issue
Block a user