title: Using multithread to save data on iOS
body: <p>I am developing an iPhone app which keeps some data. I am using archiving method from <code>NSKeyedArchiver</code> class to save the data to disk. I would like to periodically save the data to disk. The problem is, when the data grows bigger, it takes more time and it actually interrupts the user's current actions.</p>
  
  <p>Hence, I want to use multithreading to solve this problem. From my understanding of multithreading, when I want to save the data to disk, I should create a new thread, run the saving task on the new thread, then terminate the thread. I should also make the thread so that it won't immediately terminate when the app terminates, to finish saving data. This way, the user can continue to interact with the interface.</p>
  
  <p>That being said, I am not familiar with the actual code that does these work...what would the above look like in code?</p>