Haiku
Haiku
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Thanks for the help yall
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
I guess I thought it was inconsistent because I didn't realize when I absent-mindedly switched from my Application task to the gradle run task
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
I did however figure out what the problem was. We were running it through the gradle console. There's no stdin on the gradle console.
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
No description
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Wait, now that I think about it... Ok give me a few minutes to check with an actual tested minrep instead of vaguely theorizing off-hand like an asshole
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Alright give me a few minutes then
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Maybe it's an updated version then idk
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
But honestly I'm realizing that it's an openjdk version I downloaded back when 21 was still new, and my exact same code works on temurin and breaks on openjdk, so I'm fully willing to chalk it up to a jdk bug and move on
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Ah good catch
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Sure just give me a few minutes, I'm afk
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
But I've verified that the main thread is still running, not just the event queue
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Ah yeah good point The while loop is the best way to simulate what's going on, it actually opens a swing window and does stuff there
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
I was just repeating that point, don't read into it
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
It closes when the program shuts down, no sooner
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Nope
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Yep
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
What I posted
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
That is a minrep
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
Nope, only one. And the main thread is chugging away at other tasks while the virtual thread is running. Since it's not reproducible on temurin I do think it's just a JVM bug
56 replies
JCHJava Community | Help. Code. Learn.
Created by Haiku on 4/15/2025 in #java-help
Scanner not blocking inside virtual thread
NoSuchElementException on the scanner when calling input#nextLine
56 replies