# include "psphot.h"

// each thread runs this function, starting a new job when it finished with an old one
// it is called with a (void *) pointer to its own thread pointer
bool psphotThread_psphotGuessModel(psThreadJob *job)
{
    psphotGuessModelForRegionArgs *args = job->args->data[0];
    bool status = psphotGuessModelForRegion (args);
    return status;
}

bool psphotSetThreads () {

    psThreadTask *task = NULL;

    task = psThreadTaskAlloc("PSPHOT_GUESS_MODEL", 1);
    task->function = &psphotThread_psphotGuessModel;
    psThreadTaskAdd(task);
    psFree(task);

    return true;
}
