Cocoa Programming/Multithreading

From Wikibooks, open books for an open world
< Cocoa Programming
Jump to: navigation, search

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

[edit] 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.

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export