News for hackers. Stuff that matters.
Re:Go hits the concurrency nail on the head by Const-me on Thursday October 04, 2018 @09:42PM (#18145091)
Scheduling is not enough. For efficient IO you need a scheduler that’s tightly coupled with OS-specific kernel mode APIs for async IO.

Java has support for that in java.nio.channels but that’s limited and is not integrated with the rest of their standard library.

C++ can do that, too, but quite hard in practice.

Runtimes like Go, .NET and erlang already have that stuff included. There’re some limitations (e.g. erlang doesn’t support that on Windows, BTW they call the feature “kernel poll”), but still it works great and very easy to use.

Re:Go hits the concurrency nail on the head by kasey_junk on Thursday October 04, 2018 @09:54PM (#18145141)
Take a look at quasar for the JVM. In practice I’ve found it outperforms* golang in my workloads.

* there is a small fixed overhead increase in memory.

Re:Go hits the concurrency nail on the head by Const-me on Thursday October 04, 2018 @10:21PM (#18145255)
There’re indeed multiple third-party libraries for that in many languages. E.g. for C++ we have lubuv, boost.asio, etc. However, built-in solutions have upsides.

They work out of the box i.e. deployment is simpler.

They’re integrated into the language, e.g. most network IO in golang is asynchronous under the hood, compiler and runtime do that automatically.

They’re integrated into standard libraries, e.g. in .NET all streams be it files, sockets, or transforms like compressors and encryptors support asynchronous operations.

The support is usually better, too.

Re:Go hits the concurrency nail on the head by apta on Friday October 05, 2018 @04:46PM (#18151607)
The JVM is getting coroutines with Project Loom. The same Quasar devs are integrating it into the JVM.
Re:Go hits the concurrency nail on the head by apta on Friday October 05, 2018 @04:47PM (#18151611)
Quasar is going to be integrated into the JVM by means of project Loom.