• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Questions about NSDistributedNotificationCenter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Questions about NSDistributedNotificationCenter


  • Subject: RE: Questions about NSDistributedNotificationCenter
  • From: "Tony" <email@hidden>
  • Date: Sun, 29 Jul 2001 21:21:42 -0400

-----Original Message-----

>From: Lloyd Sargent <email@hidden>
>Subject: Questions about NSDistributedNotificationCenter

>Got a couple of quick questions about NSDistributedNotificationCenter:

>1. Is this the "normal" method of passing simple "messages" between
>threads?

I have noticed that these notifications are picked up by the run loop in
the main thread but would not be picked up by the run loops in secondary
threads.

In other words, if you create Obj-C object that runs default thread run loop
in detached thread selector parameter (which is one of object's methods) and
which also subscribes to NSDistributedNotificationCenter notifications, it
will never get them.

Run loop in the main thread has no such problems.

So, rather than answering your questions I'm afraid I must add that this is
not well documented. Distributed notification center can be used for
inter-process communication (several of us actually use it for IPC and
synchronization and proper timeouts are the major hurdles that we
encountered) but for in-process intra-thread communication local
notification center should be sufficient. Threading rules and affinities are
unknown at this time.

Tony


  • Prev by Date: Re: Can one extend CoreFoundation using Obj-C?
  • Next by Date: Creating and Displaying an Image
  • Previous by thread: Re: Questions about NSDistributedNotificationCenter
  • Next by thread: Creating and Displaying an Image
  • Index(es):
    • Date
    • Thread