Archive for January 12, 2009

Monday, January 12, 2009

Mac OS X Thread Safety

Mike Ash:

This is all fine and dandy except that Apple, in their infinite wisdom, does not always distinguish between main thread only and not thread safe. To make things worse, they even sometimes use the term thread safe to mean what we have defined here as not thread safe.

The post has good examples of the different kinds of thread safety in Mac OS X and how Apple describes (or neglects to describe) them. However, contra Ash, I think the documentation really is trying to convey that Search Kit is thread-safe. The full text from the reference page says:

Search Kit is thread-safe. You can use separate indexing and searching threads. Your application is responsible for ensuring that no more than one process is open at a time for writing to an index.

This implies that you can have multiple threads reading and writing, and in my experience this does work. It also points to a fourth category of thread-safety: how the API handles multiple threads or multiple processes creating separate objects that reference the same shared file or other resource.

Palm Pre

Rui Carmo:

This may come as a shocker to those who (wrongly) equate this site as being pro-iPhone (or who missed my phone of the year pick for 2008), but I think that the Pre’s UI metaphor is better than the iPhone’s.

iTunes AAC Files

Erik Barzeski says that, although iTunes music is becoming DRM-free, the purchased AAC files are broken such that they won’t play on other systems like the Xbox 360 and Nokia N95 until they’ve been run through a program that fixes the position of the 'pinf' atom.