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