#include <stdio.h>
#include <unistd.h>
#include "worker.h"
#include "log.h"

FoWorkerThread::FoWorkerThread() {
	LogMessage( "worker thread constructed" );
}

void FoWorkerThread::Init() {
	LogMessage( "worker thread initialized" );

}

void FoWorkerThread::Do( FOHANDLE quit_event ) {
	LogMessage( "worker thread started" );
	while (FoWaitForSingleObject( quit_event , 0 )!=WAIT_OBJECT_0) {
		LogMessage( "worker thread doing job" );
		usleep( 1000000 );
	}
}

void FoWorkerThread::Deinit() {
	LogMessage( "worker thread deinitialized" );
}
