29 Feb 2004 osullivj   » (Journeyer)

Generators: are doing my head in ! Been coding up the generator based async IO approach I mentioned recently this afternoon. I want real, non blocking, multi threaded concurrency. I use generators to yield after sending down a socket. And then I resume when I get a Twisted callback telling me a response has arrived. That way no thread blocks waiting on a response. Less threads, more busyness.

Figuring out where to yield and when to return, and thinking about when I want resumable stack state, and when I don't, has been a head twisting experience. Which is great, because that means I am acquiring a non trivial design idiom. Last time I had this experience was my first multithreaded code in the late 90s. Before that it was OO in the early 90s. All good stuff.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!