spider: prefix thread ids with thread name
For thread ids generated by spider itself, includes the name of the thread,
for convenient identification.
^- card
[%pass /bind %arvo %e %connect [~ /spider] %spider]
::
+++ new-thread-id
+ |= file=term
+ :((cury cat 3) file '--' (scot %uv (sham eny.bowl)))
+::
++ handle-http-request
|= [eyre-id=@ta =inbound-request:eyre]
^- (quip card _state)
=* input-mark i.t.site.url
=* thread i.t.t.site.url
=* output-mark i.t.t.t.site.url
- =/ =tid
- (scot %uv (sham eny.bowl))
+ =/ =tid (new-thread-id thread)
=. serving.state
(~(put by serving.state) tid [eyre-id output-mark])
=+ .^
?~ parent-tid
/
(~(got by tid.state) u.parent-tid)
- =/ new-tid (fall use (scot %uv (sham eny.bowl)))
+ =/ new-tid (fall use (new-thread-id file))
=/ =yarn (snoc parent-yarn new-tid)
::
?: (has-yarn running.state yarn)
