Is Blocking Evil?

A recurring theme amongst Scala enthusiasts is the assertion that blocking is evil. Indeed at a recent conference more than one speaker had a slide on the screen with those words. I’ve been pondering the evil of blocking ever since. Is it always true? is it ever true even?

The argument in favour of non-blocking I/O is an easy one: each JVM thread that’s blocked because it’s waiting for I/O cannot get on with something else useful instead.

 
comments powered by Disqus