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

  • fonts on linux

    I wrote a document on how to diagnose font problems on Linux. I would appreciate feedback, corrections, other common misconfigurations, etc.

  • socks5 proxying flash via ssh

    Suppose you're in Germany and want to watch some Flash-based videos that are IP-limited to the US for whatever reason. At first you'd think you could…

  • chromium.el

    This weekend I wrote some Emacs Lisp to write some utility functions I find useful for hacking on Chromium. It's fun to have a reason to use Lisp!…

  • 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