Concurrent Truffle languages and creating threads

Stefan Marr java at stefan-marr.de
Fri Sep 29 10:53:31 UTC 2017


Hi Chris:

> On 29 Sep 2017, at 11:43, Chris Seaton <chris.seaton at oracle.com> wrote:
> 
> How did you implement fast thread locals with the previous design?

By using fields on subclasses of Thread.

Indirectly actually:

https://github.com/smarr/SOMns/blob/master/src/tools/concurrency/TracingActivityThread.java#L16
https://github.com/smarr/SOMns/blob/master/src/som/interpreter/actors/Actor.java#L328

And thinking about it.
You are effectively telling me also that I can’t use Java’s Fork/Join pool anymore.
It also relies on a subclass of Thread.

Are you going to provide and maintain a Truffle-lized Fork/Join pool as well?

Or asked differently:
What is going to happen if I do just continue to use my own threads?
What am I going to lose?

You’re going to rely on having a context field in each thread?

Can’t we just have an interface or so for that?
This seems all highly problematic. :(

Thanks
Stefan

-- 
Stefan Marr
School of Computing, University of Kent
http://stefan-marr.de/research/




More information about the graal-dev mailing list