• 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
GCD cancel handler invocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCD cancel handler invocation


  • Subject: GCD cancel handler invocation
  • From: Jonathon Kuo <email@hidden>
  • Date: Mon, 10 Jan 2011 14:06:49 -0800

I set up a source handler on a TCP socket like this:
    dispatch_source_t newsrc = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ,sockfd,0,globalQueue);

It works well, and when a client process closes his socket my cancel_handler gets called, I clean up, and life is good. But if I do a close(sockfd) from my side, my cancel_handler doesn't get invoked. I have to explicitly do a dispatch_source_cancel(). Shouldn't closing the socket be enough to cause my cancel_handler to be run?

_______________________________________________

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: GCD cancel handler invocation
      • From: Dave Zarzycki <email@hidden>
  • Prev by Date: Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone
  • Next by Date: Re: GCD cancel handler invocation
  • Previous by thread: Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone
  • Next by thread: Re: GCD cancel handler invocation
  • Index(es):
    • Date
    • Thread