title: why my background working thread is blocking UI thread?
body: <p>I am working on an app, which uploads native contacts to server then get responses(JSON, a contact list that already installed the app). When native contacts are large enough, server response will be slow and unstable. And user cannot do other things. so I put network request into background thread. every time I will upload 100 contacts, do some tasks , then next 100 contacts until loop finish.</p>
  
  <p>But in running, the result is not as expected. background thread is running, it keeps to request server. UI thread is blocked, I still cannot do anything.</p>
  
  <p>is this cause a long loop in background thread? Although I have 2 thread, but they will compete CPU resources(test device is iPod, 1 core. And I think this may not related core numbers)?</p>
  
  <p>Could anyone tell me hints on how to handle this kind of scenario? Thanks in advance!</p>
  
  <p>Update:</p>
  
  <p>I have found the root cause. A global variable in App delegate is set to wrong value, therefore UI behavior is weird. I found this by comment all network request method. So this problem is not related with multiple threading. Sorry for the bother.</p>