• 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
[[NSNotificationCenter defaultCenter] postNotificationName] from a thread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[[NSNotificationCenter defaultCenter] postNotificationName] from a thread?


  • Subject: [[NSNotificationCenter defaultCenter] postNotificationName] from a thread?
  • From: Michael Rothwell <email@hidden>
  • Date: Sat, 1 Nov 2003 15:12:40 -0500

I'm writing an application that has several worker threads and uses
notifications. i'm worried about thread safety. In the worker threads,
I'm sending notifications back to the main thread like this:

[[NSNotificationCenter defaultCenter]
postNotificationName:@"UPnPDiscovery" object:self userInfo:d];

The main thread has registered for these notifications, and runs a
method, etc.

Should I be doing something to ensure thread safety?

-Michael
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [[NSNotificationCenter defaultCenter] postNotificationName] from a thread?
      • From: Frank Midgley <email@hidden>
    • Re: [[NSNotificationCenter defaultCenter] postNotificationName] from a thread?
      • From: "Alastair J.Houghton" <email@hidden>
  • Prev by Date: Re: Detecting login/logout?
  • Next by Date: TableView formatting and "small" NSButton questions
  • Previous by thread: Re: OT: What is ipulse-ics on Panther
  • Next by thread: Re: [[NSNotificationCenter defaultCenter] postNotificationName] from a thread?
  • Index(es):
    • Date
    • Thread