Concurrent Programming 2: Concurrent Programming with Objective-C
2013-11-24 21:25
176 查看
Concurrent Programming with Objective-C
Now that you understand some of the key issues regarding concurrent programming, you can begin to explore the mechanisms available to implement concurrent programming in Objective-C.This ranges from language features to APIs and system services, and includes the following:
Language features: The Objective-C language includes several language features to support concurrent programming. The@synchronized directive
is used to create locks in Objective-C code. Thread-safe access to Objective-C properties can be specified declaratively using the atomic property
qualifier.
Message passing: The Foundation Framework NSObject class
includes several methods that deliver messages to other threads. These methods queue the messages on the run loop of the target thread and can be performed synchronously or asynchronously.
Threads: The Foundation Framework provides a complete set of APIs for directly creating and managing threads. It also
includes a set of Foundation Framework APIs for performing synchronized access to data shared by multiple threads.
Operation queues: These
are Objective-C based message-passing mechanisms that utilize an asynchronous design approach to perform concurrent programming.
Dispatch queues: These are a C-based
set of language features and runtime services used to perform tasks asynchronously and concurrently.
相关文章推荐
- Programming with objective-c
- [译]Objective-C Runtime Programming Guide - Interacting with the Runtime (一)
- 《Programming with Objective-C》第五章 Customizing Existing Classes
- Concurrent Programming with Processes
- Programming With Objective-C(八)
- Object-Oriented Programming with Objective-C
- Programming with Objective-C笔记
- 《Programming with Objective-C》第四章 Encapsulating Data
- 《Programming with Objective-C》第三章 Working with Objects
- 《Programming with Objective-C》第七章 Values and Collections
- Concurrent Programming with I/O Multiplexing
- Programming with Objective-C(二)
- Programming with Objective-C(三)
- Working with Files(Chapter 16 of Programming in Objective-C 2.0)
- Programming with Objective-C 学习笔记
- Programming with Objective-C(五)
- Programming with Objective-C——翻译2章
- Programming with Objective-C(七)
- Programming with Objective-C——翻译1章(格式全废了)
- Programming with Objective-C(四)