title: SQLite Database with FMDatabase Wrapper
body: <p>I am using the FMDatabase SQLite wrapper in Objective C and I have the following issue:</p>
  
  <p>I am running an XML parse and DB insert in a background thread for some content that the user does not have access to, however the user is able to interact with a UI and database from the section they are in.</p>
  
  <pre><code>The FMDatabase &lt;FMDatabase: 0x17b7b0&gt; is currently in use.
  </code></pre>
  
  <p>Randomly, I will get a "FMDatabase already in use" notification and the array will never be populated by the database. I was under the impression that the FMDatabase class would handle the query once it became free, but I have a:</p>
  
  <pre><code>while(contents.count &lt; 1){
       sleep(1);
  }
  </code></pre>
  
  <p>Hoping that once the database frees up, the array will be populated. I have also tried rerunning the array population script if the DB is busy but to no avail.</p>
  
  <p>Sorry if this question is confusing, I am happy to clarify.</p>