Evan Martin (evan) wrote in evan_tech,
Evan Martin
evan
evan_tech

events and threads

LtU: Why Events Are a Bad Idea

As primarily an application programmer, it always seemed to me the problem with threads has been preemption. My tasks are always IO-bound and so any time I'm preempted while not blocked is a wasted context switch. By cooperatively multitasking it would seem I could significantly reduce the trouble of using threads (for example, I'd no longer need to worry about synchronization) and get most of the benefits.

It seems this reasoning would similarly apply to any low-CPU/IO-bound server, such as the web server they talked about in their paper or even memcached. (But what's with benchmarking your C app against a Java one? That's hardly fair.)
Tags: go read
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 6 comments