• 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
Context in GCD source cancel handler?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Context in GCD source cancel handler?


  • Subject: Context in GCD source cancel handler?
  • From: Jonathon Kuo <email@hidden>
  • Date: Wed, 5 Jan 2011 10:58:30 -0800

When a GCD source gets cancelled, either via dispatch_source_cancel() or because the source went away, I have no context other than the dispatch_source_t source variable. How can I know for which source a source cancel handler gets invoked? I have many simultaneous sources (sockets, files, etc) and when a source cancel handler gets called I have no idea what source it's for, so I can't do cleanup. Is dispatch_source_t queryable? Is there a way to attach a userInfo object to it? Do I have to manage this externally in a table myself?_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Context in GCD source cancel handler?
      • From: Dave Zarzycki <email@hidden>
  • Prev by Date: [Job Posting] Software Engineer in Columbia, MD, USA
  • Next by Date: [Solved] Re: When adding Cocoa classes I get a lot of compile errors automatically
  • Previous by thread: [Moderator] Re: [Job Posting] Software Engineer in Columbia, MD, USA
  • Next by thread: Re: Context in GCD source cancel handler?
  • Index(es):
    • Date
    • Thread