Move thread initialization into Worker::run
By moving the initialization into Worker::run, all threads, including the main thread, are properly initialized. This was not noticed before as qc_sqlite initialized the main thread in the process initialization callback.
This commit is contained in:
@ -176,8 +176,9 @@ QUERY_CLASSIFIER* get_classifier(const char* zName, qc_sql_mode_t sql_mode, cons
|
||||
|
||||
if (pClassifier)
|
||||
{
|
||||
if ((pClassifier->qc_setup(sql_mode, zArgs) != QC_RESULT_OK) ||
|
||||
((pClassifier->qc_process_init() != QC_RESULT_OK)))
|
||||
if (pClassifier->qc_setup(sql_mode, zArgs) != QC_RESULT_OK ||
|
||||
pClassifier->qc_process_init() != QC_RESULT_OK ||
|
||||
pClassifier->qc_thread_init() != QC_RESULT_OK)
|
||||
{
|
||||
cerr << "error: Could not setup or init classifier " << zName << "." << endl;
|
||||
qc_unload(pClassifier);
|
||||
|
Reference in New Issue
Block a user