Hacker News new | ask | show | jobs
by davidjfelix 1547 days ago
Admittedly it's been awhile since I've written Java, so most of this is what I remember and what I've seen successful teams using -- got any links to a "true async" in Java? I was under the impression that all Java async work was backed by thread pools.
1 comments

Yes, anything that uses NIO / Netty / epoll / io_uring / etc. under the covers will do. There are several options--IIRC at least five choices are available, but these are the ones that come to mind:

https://openjdk.java.net/jeps/321

https://github.com/AsyncHttpClient/async-http-client

https://hc.apache.org/httpcomponents-client-5.1.x/examples-a...

Thanks! I did a little research and it seems like there are some Kotlin coroutine to nio mappings (it looked like some were experimental though) and that OkHTTP is aiming to use coroutines, so I wonder if these will converge in the future.

What wasn't clear to me was if the coroutine/nio mashup still used threadpools because coroutines do.