Notification Centers

来源:互联网 发布:淘宝哪家手办店好 编辑:程序博客网 时间:2024/05/17 07:42

Cocoa includes two types of notification centers:

  • The NSNotificationCenter class manages notifications within a single process.

  • The NSDistributedNotificationCenter class manages notifications across multiple processes on a single computer.

A notification center delivers notifications to observers synchronously. In other words, when posting a notification, control does not return to the poster until all observers have received and processed the notification. To send notifications asynchronously use a notification queue, which is described in “Notification Queues.”

For communication between processes on different machines, use distributed objects (see Distributed Objects Programming Topics).
0 0
原创粉丝点击