• 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
NSURLConnection not removing itself from the RunLoop ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURLConnection not removing itself from the RunLoop ?


  • Subject: NSURLConnection not removing itself from the RunLoop ?
  • From: Thomas Deniau <email@hidden>
  • Date: Wed, 9 Jul 2003 11:41:11 -0400

Hi !

In a separate thread, I create a NSURLConnection and then run the run loop :

NSLog(@"Running run loop");
[[NSRunLoop currentRunLoop] run];
NSLog(@"Run loop exiting");

The problem is that the run loop never exits even when my connection has sent me the connectionDidFinishLoading: message.

So i tried to do a [connection cancel] anyway, but the run loop doesn't exit either.

Indeed, when I try to log the run loop (after having cancelled the connection, or even after having RELEASED it), I get

<CFRunLoop 0x4a616d0 [0xa01303fc]>
[......]
sources = <CFSet 0x4a63e20 [0xa01303fc]>{count = 1, capacity = 11, values = (
0 : <CFRunLoopSource 0x4a63d30 [0xa01303fc]>{locked = No, valid = Yes, order = 0, context = <CFRunLoopSource context 0x4a61690>}
[......]

When I log the run loop in connection:didReceiveData: (that is, when the connection isn't finished yet) I get the same sources.
So that means that the connection doesn't remove itself from the run loop's sources... even when it's cancelled or released.

How can I force the connection to clean up the run loop's sources ?

Thanks in advance,

--
Thomas Deniau
_______________________________________________
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: NSURLConnection not removing itself from the RunLoop ?
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: class dispatch table has duplicate names right?
  • Next by Date: Re: awakeFromNib and windowWillLoad : basic question
  • Previous by thread: WebKit/WebResourceLoadDelegate problem
  • Next by thread: Re: NSURLConnection not removing itself from the RunLoop ?
  • Index(es):
    • Date
    • Thread