Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add feature to control systemic property of executeCode #6519

Merged
merged 15 commits into from
Jan 8, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ public static boolean isSystemicThread() {
}

/**
* Marks the current thread as systemically important, this is a permanent change.
* Marks the current thread as systemically important, this can be changed with {@link #markThreadNotSystemic()}.
*/
public static void markThreadSystemic() {
if (SYSTEMIC_OBJECT_MARKING_ENABLED) {
SYSTEMIC_CREATION_THREAD.set(true);
}
}

/**
* Marks the current thread as not systemically important, this can be changed with {@link #markThreadSystemic()}
* ()}
abaranec marked this conversation as resolved.
Show resolved Hide resolved
abaranec marked this conversation as resolved.
Show resolved Hide resolved
*/
public static void markThreadNotSystemic() {
rcaudy marked this conversation as resolved.
Show resolved Hide resolved
if (SYSTEMIC_OBJECT_MARKING_ENABLED) {
SYSTEMIC_CREATION_THREAD.set(false);
}
}

/**
* Execute the supplier with the thread's systemic importance set to the value of systemicThread.
*
Expand Down
Loading