Getting stack trace between fibers

Ron Pressler ron.pressler at
Tue Oct 30 20:22:56 UTC 2018


I had originally thought of providing a getStackTrace method on Continuation, but there are concurrency issues that
we don’t want to handle at the continuation level. Instead, this will likely be implemented in Fiber, in a similar way
to how it’s done in Quasar: by temporarily mounting the continuation on the current thread (preventing concurrent
mounts, and then obtaining the stack trace).

On October 30, 2018 at 7:58:13 PM, Ron Pressler (ron.pressler at wrote:


Obtaining stack traces will not be done through the shadow thread mechanism, but through a different one, which is not yet implemented.
The shadow thread is not a real thread (i.e. it is only a Java Thread object, but one that is not backed by a kernel thread).
Perhaps there will be a getStackTrace method on Fiber, in which case that is the one that will need to be used in this (excellent) test.


On October 30, 2018 at 4:42:24 PM, Fabio Tudone (fabtud at wrote:

Hi, I would expect to be able to obtain a running Fiber's stack trace form
another running Fiber (via the shadow thread), is that correct?

If so I think there might be an issue, please see the following test:

-- Fabio


More information about the loom-dev mailing list