Concurrent Truffle languages and creating threads

Stefan Marr java at stefan-marr.de
Fri Sep 29 13:40:04 UTC 2017


Hi Christian:

> On 29 Sep 2017, at 14:32, Christian Humer <christian.humer at gmail.com> wrote:
> 
> > Yes, it is quite integral to SOMns.
> 
> That's unfortunate. I expected fork join pools to be composable with other frameworks.

Another lovely facility of the JDK:

java.util.Timer
and it also uses a Thread subclass (java.util.TimerThread).

Of course, also used in SOMns, but less critical because it doesn’t actually execute language code. It only submits a new job on the fork/join pool.

> Something similar to ThreadLocal. Implementation wise we can do fast slots in the context object that get initialized when the language context or the local is initialized. So the access should compile to just a read relative to the current thread pointer and an array read. 

Hm, ok. I’ll try to see what that is in terms of performance impact when available.

Thanks
Stefan

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




More information about the graal-dev mailing list