MacTech Article: 2605Road to Code
26.05 The Road to Code: Calling All CPUs
Article Synopsis
It can be difficult to write multithreaded code safely. We talked about race conditions that can happen when two threads try and access the same variable at the same time and how to avoid them using the @synchronized keyword to lock critical sections. Other dangers of threads include deadlocks and live locks.
Mac OS X 10.5, Leopard, and iPhone OS 2.0 added the concept of operation queues to help with concurrency issues.
This article was published in the 26.05 issue of MacTech Magazine. Subscribers saw
this article in the print magazine when it was first published. MacTech provides its readers with valuable information
each and every month, but even if it only solves one problem for you a year, it's more than paid for itself.
Subscribe today with a special RISK FREE trial subscription ... and get the back issues at the MacTech Store, or the new MacTech CD with the history of
the magazine all in one convenient place.