4 ms·
> We are talking virtual threads here(project loom), i think, no? No. Currently, when I have code (not using futures or anything) and in the middle there is a
by valenterry 4y ago
> We are talking virtual threads here(project loom), i think, no?
No.
Currently, when I have code (not using futures or anything) and in the middle there is a Thread.sleep() then I know that this thread will be blocked until the sleep is over (or interrupted) and _no other code is being executed on this thread_.
So the question is: will this behaviour change? Because if it does, then Loom breaks existing code. And that's what it does. And it does it not by accident but on purpose, to retroactively improve performance of exactly those situations where OS threads are blocked.
- pestatije 4y agoah ok i see your single thread is blocked nevermind