Skip to content

Commit 4f8f501

Browse files
committed
Preferring onSpinWait over yield
Signed-off-by: David Matějček <[email protected]>
1 parent 1c66671 commit 4f8f501

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nucleus/glassfish-jul-extension/src/main/java/org/glassfish/main/jul/GlassFishLogger.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2024 Eclipse Foundation and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2025 Contributors to the Eclipse Foundation
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -507,7 +507,7 @@ private void logOrQueue(final LogRecord record, final GlassFishLoggingStatus sta
507507
return;
508508
}
509509
while (!isFullService(getLoggingStatus())) {
510-
Thread.yield();
510+
Thread.onSpinWait();
511511
}
512512
checkAndLog(record);
513513
}

0 commit comments

Comments
 (0)