We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c47b03 commit 684db43Copy full SHA for 684db43
src/java.base/share/classes/java/io/RandomAccessFile.java
@@ -534,7 +534,11 @@ public int skipBytes(int n) throws IOException {
534
* @throws IOException if an I/O error occurs.
535
*/
536
public void write(int b) throws IOException {
537
- Blocker.managedBlock(() -> write0(b));
+ if (Thread.currentThread().isVirtual()) {
538
+ Blocker.managedBlock(() -> write0(b));
539
+ } else {
540
+ write0(b);
541
+ }
542
}
543
544
private native void write0(int b) throws IOException;
0 commit comments