Skip to content

Commit

Permalink
Merge pull request #490 from jglick/WorkflowRun.LOADING_RUNS
Browse files Browse the repository at this point in the history
Logging in `WorkflowRun.LOADING_RUNS`
  • Loading branch information
jglick authored Dec 2, 2024
2 parents 26180bf + f91254d commit e4d5eca
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ private String key() {

/** Hack to allow {@link #execution} to use an {@link Owner} referring to this run, even when it has not yet been loaded. */
@Override public void reload() throws IOException {
LOGGER.fine(() -> "Adding " + key() + " to LOADING_RUNS");
synchronized (LOADING_RUNS) {
LOADING_RUNS.put(key(), this);
}
Expand Down Expand Up @@ -612,6 +613,7 @@ private String key() {
}
} finally { // Ensure the run is ALWAYS removed from loading even if something failed, so threads awaken.
checkouts(null); // only for diagnostics
LOGGER.fine(() -> "Removing " + key() + " from LOADING_RUNS");
synchronized (LOADING_RUNS) {
LOADING_RUNS.remove(key()); // or could just make the value type be WeakReference<WorkflowRun>
LOADING_RUNS.notifyAll();
Expand Down

0 comments on commit e4d5eca

Please sign in to comment.