Archive for March 4, 2011

Friday, March 4, 2011

Multitasking

Lukas Mathis:

The fact that the iPad only lets me see one app at a time often does not help me focus. Instead, it forces me to switch between apps constantly, thus preventing me from focusing on my task. Every time I have to deal with the iPad’s task switching, I’m interrupted.

A Tour of OSAtomic

Mike Ash:

To see how you can use these, let’s consider how you would write OSAtomicAdd32 using compare and swap. Again, it works using a transaction model. First, fetch the original value. Then add to obtain a new value. Finally, use compare and swap with the original and new values. If it failed, go back and try everything again.