@@ -34,7 +34,7 @@ Here's a simple example of a thread that starts another thread:
34(pure:m !>(~))
34(pure:m !>(~))
37−Save `parent.hoon` and `child.hoon` in `/ted`, `|commit %home` and run `-parent`. You should see something like:
37+Save `parent.hoon` and `child.hoon` in `/ted` of the `%base` desk, `|commit %base` and run `-parent`. You should see something like:
@@ -74,7 +74,7 @@ If we want to actually get the result of the thread we started, it's slightly mo
74;< ~ bind:m %- poke-our
74;< ~ bind:m %- poke-our
75 :* %spider
75 :* %spider
76 %spider-start
76 %spider-start
77− !>([`tid.bowl `tid %child !>(~)])
77+ !>([`tid.bowl `tid byk.bowl %child !>(~)])
79;< =cage bind:m (take-fact /awaiting/[tid])
79;< =cage bind:m (take-fact /awaiting/[tid])
80;< ~ bind:m (take-kick /awaiting/[tid])
80;< ~ bind:m (take-kick /awaiting/[tid])
@@ -130,14 +130,15 @@ We pre-emptively subscribe for the result. Spider sends the result at `/thread-r
130;< ~ bind:m %- poke-our
130;< ~ bind:m %- poke-our
131 :* %spider
131 :* %spider
132 %spider-start
132 %spider-start
133− !>([`tid.bowl `tid %child !>(~)])
133+ !>([`tid.bowl byk.bowl `tid %child !>(~)])
137−Spider takes a poke with a mark %spider-start and a vase containing `[parent=(unit tid) use=(unit tid) file=term =vase]` to start a thread, where:
137+Spider takes a poke with a mark %spider-start and a vase containing `[parent=(unit tid) use=(unit tid) =beak file=term =vase]` to start a thread, where:
139- `parent` is an optional parent thread. In this case we say the parent is our tid. Specifying a parent means the child will be killed if the parent ends.
139- `parent` is an optional parent thread. In this case we say the parent is our tid. Specifying a parent means the child will be killed if the parent ends.
140- `use` is the thread ID for the thread we're creating
140- `use` is the thread ID for the thread we're creating
141+- `beak` is a `[p=ship q=desk r=case]` triple which specifies the desk and revision containing the thread we want to run. In this case we just use `byk.bowl`.
141- `file` is the filename of the thread we want to start
142- `file` is the filename of the thread we want to start
142- `vase` is the vase it will be given as an argument when it's started
143- `vase` is the vase it will be given as an argument when it's started
@@ -180,7 +181,7 @@ Finally we test whether the thread produced a `%thread-done` or a `%thread-fail`
180;< ~ bind:m %- poke-our
181;< ~ bind:m %- poke-our
181 :* %spider
182 :* %spider
182 %spider-start
183 %spider-start
183− !>([`tid.bowl `tid %child !>(~)])
184+ !>([`tid.bowl byk.bowl `tid %child !>(~)])
185;< ~ bind:m (sleep ~s5)
186;< ~ bind:m (sleep ~s5)
186%- (slog leaf+"Stopping child thread..." ~)
187%- (slog leaf+"Stopping child thread..." ~)