Use the job queue rather than an ephemeral thread for validation writeouts.

This commit is contained in:
JoelKatz
2013-02-27 15:52:33 -08:00
parent 50be7dd7e4
commit ab89fbdcf6
2 changed files with 4 additions and 4 deletions

View File

@@ -293,11 +293,10 @@ void ValidationCollection::condWrite()
if (mWriting)
return;
mWriting = true;
boost::thread thread(boost::bind(&ValidationCollection::doWrite, this));
thread.detach();
theApp->getJobQueue().addJob(jtWRITE, boost::bind(&ValidationCollection::doWrite, this, _1));
}
void ValidationCollection::doWrite()
void ValidationCollection::doWrite(Job&)
{
LoadEvent::autoptr event(theApp->getJobQueue().getLoadEventAP(jtDISK));
static boost::format insVal("INSERT INTO Validations "