1

In my iphone application, i'm creating NSThread and running some code. In the same thread, I'm using NSURLConnection and trying to get some data from server. I implemented all the delegates related to connection. In the thread i also had the following code to wait for completion of getting data from server:

while (threadFinished == NO) {
    [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; 
}

But its crashing immediate next line to above code. Its just saying EXC_BAD_ACCESS. Can some one guide me infixing the issue.

Satyam
  • 15,493
  • 31
  • 131
  • 244

0 Answers0