public class ThreadingSupportImpl extends Object implements org.graalvm.nativeimage.impl.ThreadingSupport
Modifier and Type | Class and Description |
---|---|
static class |
ThreadingSupportImpl.Options |
Constructor and Description |
---|
ThreadingSupportImpl() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isRecurringCallbackPaused()
Returns true if recurring callbacks are paused.
|
static boolean |
isRecurringCallbackSupported() |
static void |
pauseRecurringCallback(String reason)
Recurring callbacks execute arbitrary code and can throw
Safepoint.SafepointException s. |
void |
registerRecurringCallback(long interval,
TimeUnit unit,
org.graalvm.nativeimage.Threading.RecurringCallback callback) |
static void |
resumeRecurringCallback()
Like
ThreadingSupportImpl.resumeRecurringCallbackAtNextSafepoint() but with the difference that this
method may trigger the execution of the recurring callback right away. |
static void |
resumeRecurringCallbackAtNextSafepoint()
Resumes the execution of recurring callbacks.
|
public void registerRecurringCallback(long interval, TimeUnit unit, org.graalvm.nativeimage.Threading.RecurringCallback callback)
registerRecurringCallback
in interface org.graalvm.nativeimage.impl.ThreadingSupport
public static void pauseRecurringCallback(String reason)
Safepoint.SafepointException
s. In some
code parts (e.g., when executing VM operations), we can't deal with arbitrary code execution
and therefore need to pause the execution of recurring callbacks.public static void resumeRecurringCallbackAtNextSafepoint()
public static void resumeRecurringCallback()
ThreadingSupportImpl.resumeRecurringCallbackAtNextSafepoint()
but with the difference that this
method may trigger the execution of the recurring callback right away.public static boolean isRecurringCallbackPaused()
public static boolean isRecurringCallbackSupported()