Getting stack trace between fibers

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


P.S.

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 oracle.com) wrote:

Hi.

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.

Ron

On October 30, 2018 at 4:42:24 PM, Fabio Tudone (fabtud at gmail.com) 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:

https://github.com/circlespainter/loom-study/blob/dc14277b19a0f4b000609be972829532668911ab/src/test/java/com/dtcs/study/loom/FiberTest.java#L34

Thanks,
-- Fabio

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


More information about the loom-dev mailing list