mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
thread-watch-hook: edge cases tested and fixed
This commit is contained in:
parent
ed81e2304d
commit
63a0bb00c0
@ -123,8 +123,8 @@
|
||||
(on-agent:def wire sign)
|
||||
?~ p.sign [~ this]
|
||||
=/ =time (slav %da i.t.wire)
|
||||
=/ tid (slav %uv i.t.t.wire)
|
||||
=/ =observer:sur (~(got by observers) time)
|
||||
~& added-invalid-observer+observer
|
||||
:_ this(observers (~(del by observers) time))
|
||||
:~ :* %pass
|
||||
[%observer i.t.wire ~]
|
||||
@ -148,6 +148,7 @@
|
||||
[%thread-result @ ~] [~ this]
|
||||
[%observer @ ~]
|
||||
=/ =time (slav %da i.t.wire)
|
||||
~& watch-ack-deleting-observer+(~(got by observers) time)
|
||||
[~ this(observers (~(del by observers) time))]
|
||||
==
|
||||
::
|
||||
@ -155,18 +156,34 @@
|
||||
?+ wire (on-agent:def wire sign)
|
||||
[%thread-result @ ~]
|
||||
?. =(p.cage.sign %thread-fail)
|
||||
[~ this]
|
||||
:_ this
|
||||
:_ ~
|
||||
:* %pass
|
||||
wire
|
||||
%agent
|
||||
[our.bowl %spider]
|
||||
%leave
|
||||
~
|
||||
==
|
||||
=/ =time (slav %da i.t.wire)
|
||||
=/ =observer:sur (~(got by observers) time)
|
||||
~& observer-failed+observer
|
||||
:_ this(observers (~(del by observers) time))
|
||||
:_ ~
|
||||
:* %pass
|
||||
[%observer i.t.wire ~]
|
||||
%agent
|
||||
[our.bowl app.observer]
|
||||
%leave
|
||||
~
|
||||
==
|
||||
:~ :* %pass
|
||||
[%observer i.t.wire ~]
|
||||
%agent
|
||||
[our.bowl app.observer]
|
||||
%leave
|
||||
~
|
||||
==
|
||||
:* %pass
|
||||
wire
|
||||
%agent
|
||||
[our.bowl %spider]
|
||||
%leave
|
||||
~
|
||||
==
|
||||
==
|
||||
::
|
||||
[%observer @ ~]
|
||||
=/ =time (slav %da i.t.wire)
|
||||
@ -174,20 +191,20 @@
|
||||
=/ tid (scot %uv (sham eny.bowl))
|
||||
:_ this
|
||||
:~ :* %pass
|
||||
[%thread-result i.t.wire ~]
|
||||
%agent
|
||||
[our.bowl %spider]
|
||||
%watch
|
||||
[%thread-result tid ~]
|
||||
==
|
||||
:* %pass
|
||||
[%thread-start i.t.wire tid ~]
|
||||
%agent
|
||||
[our.bowl %spider]
|
||||
%poke
|
||||
%spider-start
|
||||
!>([~ `tid thread.observer (slop q.cage.sign !>(~))])
|
||||
==
|
||||
:* %pass
|
||||
[%thread-result tid ~]
|
||||
%agent
|
||||
[our.bowl %spider]
|
||||
%watch
|
||||
[%thread-result tid ~]
|
||||
== ==
|
||||
== ==
|
||||
==
|
||||
==
|
||||
::
|
||||
|
@ -11,8 +11,6 @@
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
=+ !<([=update:inv ~] arg)
|
||||
;< ~ bind:m
|
||||
(flog-text "{<update>}")
|
||||
?. ?=(%accepted -.update)
|
||||
(pure:m !>(~))
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
@ -20,7 +18,6 @@
|
||||
?: =(our.bowl entity.resource.invite)
|
||||
:: do not crash because that will kill the invitatory subscription
|
||||
(pure:m !>(~))
|
||||
~& 'send graph-join'
|
||||
;< ~ bind:m
|
||||
%+ poke-our %spider
|
||||
=- spider-start+!>([`tid.bowl ~ %graph-join -])
|
||||
|
Loading…
Reference in New Issue
Block a user