Context in GCD source cancel handler?
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