Reference

Spider

Start thread

Poke spider with mark %spider-start and a vase containing start-args:

+$  start-args
  [parent=(unit tid) use=(unit tid) file=term =vase]

Where:

Example

[%pass /some-path %agent [our.bowl %spider] %poke %spider-start !>([~ `tid %foo !>(~)])]

Stop thread

Poke spider with mark %spider-stop and a vase containing [tid ?], where:

Example

[%pass /some-path %agent [our.bowl %spider] %poke %spider-stop !>([tid %.y)]

Subscribe to thread result

Spider will send the result on /thread-result/[tid] so you can subscribe there for the result. You should subscribe before starting the thread.

The result will have a mark of either %thread-fail or %thread-done.

Example

[%pass /some-path %agent [our.bowl %spider] %watch /thread-result/[tid]]

Subscribe to thread

You can subscribe to a thread on /thread/[tid]/path. Note this is for facts sent off by the thread while it's running, not the final result. The path depends on the particular thread.

Example

[%pass /some-path %agent [our.bowl %spider] %watch /thread/[tid]/thread-path]

Poke Thread

To poke a thread you poke spider with a mark of %spider-input and a vase of [tid cage].

Example

[%pass /some-path %agent [our.bowl %spider] %poke %spider-input !>([tid %foo !>('foooo')])]