[concurrency-interest] Blocking vs. non-blocking

Kasper Nielsen kasperni at gmail.com
Sat Jun 14 06:01:49 EDT 2014

On Sat, Jun 14, 2014 at 1:35 AM, Dennis Sosnoski <dms at sosnoski.com> wrote:

> I'm writing an article where I'm discussing both blocking waits and
> non-blocking callbacks for handling events. As I see it, there are two main
> reasons for preferring non-blocking:
> 1. Threads are expensive resources (limited to on the order of 10000 per
> JVM), and tying one up just waiting for an event completion is a waste of
> this resource
> 2. Thread switching adds substantial overhead to the application
> Are there any other good reasons I'm missing?
If you include non-performance reasons. Blocking waits scores big on
simpler control flow, easier to debug and no manual stack management.

- Kasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20140614/3bed64cf/attachment.html>

More information about the Concurrency-interest mailing list