Alex Pooley's Blog

Hello there, my name is Alex Pooley and I'm a freelance web developer residing in Perth, Western Australia. My passion is in the development of web sites that solve everyday problems. Here's a gallery of some of my notable work. If you need a web site designer or developer, contact me with further details. Lastly, you can read more about me.

Race Conditions

May 26th, 2006

Why don't you subscribe to my blog while you're here? I'm a freelance web developer and I blog about Ruby, Rails, and business online.

Go ahead and subscribe to my RSS feed. Thanks for visiting!

Further to the technology stew “spoken of previously”:http://alexpooley.com/articles/2006/05/25/web-stew I would like to propose a side dish. Asynchronous calls, network latency, and unpredictable bouts of keyboarding bashing from users can lead to… *race conditions*.

Far out, as if I don’t have enough to contend with. Those of you familiar with race conditions know debugging the bastards requires a combination of voodoo and luck. So, if you don’t have a witch doctor handy (and why wouldn’t you?), I hope you have a lepricorn, rabbits foot, or maybe a rainbow by your side. Race conditions arise when multiple threads of logic interweave with one another in unpredictable ways. Sometimes this is OK, like when the logic is accessing mutually exclusive ’stuff’. But, when you have multiple threads accessing the same ‘thing’ sometimes you never know who’s going to get there first and that can be a problem.

A race condition is like two vehicles racing toward the same unmarked cross road. In geek talk the cross road is known as the critical section. The trick is to control the flow between the critical section so you don’t blow stuff up. The problem with race conditions in programming is finding the critical section. It’s not always obvious.

Leave a Reply

buy mp3 music uk vpn