@FunctionalInterface protected static interface TruffleInstrument.ContextThreadLocalFactory<T>
Modifier and Type | Method and Description |
---|---|
T |
create(TruffleContext context,
Thread thread)
Returns a new value for a context thread local for a context and thread.
|
T create(TruffleContext context, Thread thread)
null
and must return a stable and exact type per
registered instrument. A thread local must always return the same
class
, even for multiple instances of the same
TruffleInstrument
. If this method throws an
AbstractTruffleException
the exception interop
messages may be executed without a context being entered.