Kelvin's link is dead, here's a bit of code that does what you are asking for (meant to be run in a method called by [NSThread detachNewThreadSelector:toTarget:WithObject:]). Note that the connection basically starts working as soo as you enter the run loop, and that "terminateRunLoop" is meant to be a BOOL set to NO on start and set to YES when the connection finishes loading or has an error.
Why would you want to do this instead of a blocking synchronous request? One reason is that you may want to be able to cancel a long-running connection properly, even if you do not have a lot of them. Also I have seen the UI get hung up a bit if you start having a number of async requests going on in the main run loop.
NSURLConnection *connection = [[NSURLConnection connectionWithRequest:request delegate:self] retain];
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
while(!terminateRunLoop)
{
if ( ![[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
beforeDate:[NSDate distantFuture]])
{ break; }
[pool drain];
}
[pool release];
}