< Cocoa Programming

Multithreading in Cocoa is just like multithreading in any other *nix application, but there are a couple things you should know.

Not All Cocoa Objects are Thread-Safe

Mutable objects are pretty much not thread-safe, and you should attempt to avoid them and find an immutable alternative. If none exists, you can use locks to synchronize the access mutable objects across threads.

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.