static void* runCallback(void* arg) { IThread* thread = (IThread*) arg; thread->getTask()->operator()(); thread->setRunning(false); }