I am using the FMDatabase SQLite wrapper in Objective C and I have the following issue:
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.
The FMDatabase <FMDatabase: 0x17b7b0> is currently in use.
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:
while(contents.count < 1){
sleep(1);
}
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.
Sorry if this question is confusing, I am happy to clarify.