/*
 * @(#)Thread.cpp
 *
 * This file is part of webCDwriter - Network CD Writing.
 *
 * Copyright (C) 2002 Jörg P. M. Haeger
 *
 * webCDwriter is free software. See CDWserver.cpp for details.
 *
 * Jörg Haeger, 22.04.2002
 */

#include <pthread.h>
#include "Thread.h"

Thread::Thread() {
}

Thread::~Thread() {
}

void Thread::run() {
}

void *Thread::run(void *arg) {
	Thread *thread = (Thread *)arg;
	thread->run();
	delete thread;
	return NULL;
}

void Thread::start() {
	pthread_t thread;
	if (pthread_create(&thread, NULL, &run, this) == 0)
		pthread_detach(thread);
}
