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