Given a pREPL client that evaluates this expr:
(do
(-> (bound-fn []
(dotimes [_ 4]
(Thread/sleep 100)
(println 1)))
Thread.
(doto .start))
1)
Output will be, correctly:
{:tag :ret, :val 1, :ns user, :ms 4, :form (do
(-> (bound-fn []
(dotimes [_ 4]
(Thread/sleep 100)
(println 1)))
Thread.
(doto .start))
1)}
{:tag :out, :val 1
}
{:tag :out, :val 1
}
{:tag :out, :val 1
}
{:tag :out, :val 1
}
Now, the problem is, that output that came from a thread may be printed anytime, maybe 1 minute from now.
During that time, many other pREPL requests may have been processed.
So in absence of an ID, a message like {:tag :out, :val 1}
lacks sufficient context to be able to track where it's coming from.
Would adding IDs be a good idea?