on master help sign in
threads: replace q with r in thread start args
commit8b6211c3f739cc6eb1699710aadd756121a1f4d7 authorTinnus Napbus <admin@tinnus-napbus.xyz> dateWed 4 May 2022, 21:22 (4 years ago) parent5485999
6 files changed+9−9
content/docs/userspace/threads/examples/child-thread.md+3−3 content/docs/userspace/threads/gall/poke-thread.md+1−1 content/docs/userspace/threads/gall/start-thread.md+2−2 content/docs/userspace/threads/gall/stop-thread.md+1−1 content/docs/userspace/threads/gall/take-facts.md+1−1 content/docs/userspace/threads/gall/take-result.md+1−1
content/docs/userspace/threads/examples/child-thread.md+3−3
@@ -75,7 +75,7 @@ We note that this is mostly the same as `await-thread:strandio`.
7575;< ~ bind:m %- poke-our
7676 :* %spider
7777 %spider-start
78− !>([`tid.bowl `tid byk.bowl(q da+now.bowl) %child !>(~)])
78+ !>([`tid.bowl `tid byk.bowl(r da+now.bowl) %child !>(~)])
7979 ==
8080;< =cage bind:m (take-fact /awaiting/[tid])
8181;< ~ bind:m (take-kick /awaiting/[tid])
@@ -131,7 +131,7 @@ We pre-emptively subscribe for the result. Spider sends the result at `/thread-r
131131;< ~ bind:m %- poke-our
132132 :* %spider
133133 %spider-start
134− !>([`tid.bowl `tid byk.bowl(q da+now.bowl) %child !>(~)])
134+ !>([`tid.bowl `tid byk.bowl(r da+now.bowl) %child !>(~)])
135135 ==
136136```
137137
@@ -184,7 +184,7 @@ Finally we test whether the thread produced a `%thread-done` or a `%thread-fail`
184184;< ~ bind:m %- poke-our
185185 :* %spider
186186 %spider-start
187− !>([`tid.bowl byk.bowl(q da+now.bowl) `tid %child !>(~)])
187+ !>([`tid.bowl byk.bowl(r da+now.bowl) `tid %child !>(~)])
188188 ==
189189;< ~ bind:m (sleep ~s5)
190190%- (slog leaf+"Stopping child thread..." ~)
content/docs/userspace/threads/gall/poke-thread.md+1−1
@@ -29,7 +29,7 @@ Here's a modified agent that pokes our thread. I've replaced some off the previo
2929 (pair term term)
3030 =/ tid `@ta`(cat 3 'thread_' (scot %uv (sham eny.bowl)))
3131 =/ ta-now `@ta`(scot %da now.bowl)
32− =/ start-args [~ `tid byk.bowl(q da+now.bowl) p.q.vase !>(q.q.vase)]
32+ =/ start-args [~ `tid byk.bowl(r da+now.bowl) p.q.vase !>(q.q.vase)]
3333 :_ this
3434 :~
3535 [%pass /thread/[ta-now] %agent [our.bowl %spider] %watch /thread-result/[tid]]
content/docs/userspace/threads/gall/start-thread.md+2−2
@@ -29,7 +29,7 @@ Here's an example of a barebones gall agent that just starts a thread:
2929 (pair term term)
3030 =/ tid `@ta`(cat 3 'thread_' (scot %uv (sham eny.bowl)))
3131 =/ ta-now `@ta`(scot %da now.bowl)
32− =/ start-args [~ `tid byk.bowl(q da+now.bowl) p.q.vase !>(q.q.vase)]
32+ =/ start-args [~ `tid byk.bowl(r da+now.bowl) p.q.vase !>(q.q.vase)]
3333 :_ this
3434 :~
3535 [%pass /thread/[ta-now] %agent [our.bowl %spider] %poke %spider-start !>(start-args)]
@@ -116,7 +116,7 @@ We can ignore the input logic, here's the important part:
116116```hoon
117117=/ tid `@ta`(cat 3 'thread_' (scot %uv (sham eny.bowl)))
118118=/ ta-now `@ta`(scot %da now.bowl)
119−=/ start-args [~ `tid byk.bowl(q da+now.bowl) p.q.vase !>(q.q.vase)]
119+=/ start-args [~ `tid byk.bowl(r da+now.bowl) p.q.vase !>(q.q.vase)]
120120:_ this
121121:~
122122 [%pass /thread/[ta-now] %agent [our.bowl %spider] %poke %spider-start !>(start-args)]
content/docs/userspace/threads/gall/stop-thread.md+1−1
@@ -29,7 +29,7 @@ Here we've added one last card to `on-poke` to stop the thread and a little extr
2929 (pair term term)
3030 =/ tid `@ta`(cat 3 'thread_' (scot %uv (sham eny.bowl)))
3131 =/ ta-now `@ta`(scot %da now.bowl)
32− =/ start-args [~ `tid byk.bowl(q da+now.bowl) p.q.vase !>(q.q.vase)]
32+ =/ start-args [~ `tid byk.bowl(r da+now.bowl) p.q.vase !>(q.q.vase)]
3333 :_ this
3434 :~
3535 [%pass /thread/[ta-now] %agent [our.bowl %spider] %watch /thread-result/[tid]]
content/docs/userspace/threads/gall/take-facts.md+1−1
@@ -31,7 +31,7 @@ Here we've added another card to subscribe for any facts sent by the thread and
3131 (pair term term)
3232 =/ tid `@ta`(cat 3 'thread_' (scot %uv (sham eny.bowl)))
3333 =/ ta-now `@ta`(scot %da now.bowl)
34− =/ start-args [~ `tid byk.bowl(q da+now.bowl) p.q.vase !>(q.q.vase)]
34+ =/ start-args [~ `tid byk.bowl(r da+now.bowl) p.q.vase !>(q.q.vase)]
3535 :_ this
3636 :~
3737 [%pass /thread/[ta-now] %agent [our.bowl %spider] %watch /thread-result/[tid]]
content/docs/userspace/threads/gall/take-result.md+1−1
@@ -29,7 +29,7 @@ Here we've added an extra card to subscribe for the result and a couple of lines
2929 (pair term term)
3030 =/ tid `@ta`(cat 3 'thread_' (scot %uv (sham eny.bowl)))
3131 =/ ta-now `@ta`(scot %da now.bowl)
32− =/ start-args [~ `tid byk.bowl(q da+now.bowl) p.q.vase !>(q.q.vase)]
32+ =/ start-args [~ `tid byk.bowl(r da+now.bowl) p.q.vase !>(q.q.vase)]
3333 :_ this
3434 :~
3535 [%pass /thread/[ta-now] %agent [our.bowl %spider] %watch /thread-result/[tid]]