Skip to content

Commit

Permalink
Add a method to disable systemic object tracking. Needed for Core+
Browse files Browse the repository at this point in the history
  • Loading branch information
abaranec committed Jan 4, 2025
1 parent b3dd56c commit 64478be
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,23 @@ 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()} ()}
*/
public static void markThreadNotSystemic() {
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

0 comments on commit 64478be

Please sign in to comment.