public interface ThreadsListener
to register an implementation of this listener. Use
EventBinding.dispose() to unregister.
The listener gets called when a thread is initialized for use in a
or thread-related resources are disposed in a context. The notification calls do not say anything
about the actual life-time of the thread as such, which may live before the initialization and
may continue to live after the disposal.
|Modifier and Type||Method and Description|
Notifies about disposal of thread-related resources that were used for a guest language execution in a
Notifies about initialization of a thread to be used for a guest language execution in a
void onThreadInitialized(TruffleContext context, Thread thread)
TruffleContext. If this method throws an
AbstractTruffleExceptionthe exception interop messages may be executed without a context being entered.
context- the context the thread is initialized in
thread- the initialized thread
void onThreadDisposed(TruffleContext context, Thread thread)
context- the context the thread is disposed from
thread- the thread