Concurrency

Threads suck! Alright, maybe I’ve been convinced by the Shub, or hung around python people too much, but threads should be considered a concurrency primitive, not a concurrency solution. Processes, actors, mailboxes, however you want to describe, they are much easier to understand and get right.

So when I have some time, or a project that requires concurrency (GUI, game, something like that) I’d like to use Axon and Kaemelia. They seem conceptually smaller and simpler to grasp than twisted. Ideally I’d be able to make a gui through using Axon components with Qt, but I’ll have to investigate how the best way to interface the Axon generators to Qt callbacks would be.

What also appeals to be is since each component is separated, they can easily be unit tested. Also, no global variable or race condition issues, yay!

[As a side note, Hoare actually extended his logic for sequential systems to concurrent systems sometime in the 1980s, either 1980 or 1984, if I do any heavy duty cleanroom development with concurrency, I'll probably have to look those up.]

Comments are closed.