24 #define usleep(A) Sleep(A/1000)
29 using namespace YACS::BASES;
37 go(funcPtr,stack,stackSize);
40 void ThreadPT::go(ThreadJob funcPtr,
void *stack,
size_t stackSize)
43 void **stackT=(
void **) stack;
45 pthread_attr_init(&attr);
48 err = pthread_attr_setstacksize(&attr, stackSize);
49 if (err != 0)
throw Exception(
"Error when setting thread stack size");
51 err = pthread_create(&
_threadId, &attr, funcPtr, stackT);
52 pthread_attr_destroy(&attr);
53 if(err!=0)
throw Exception(
"Error in thread creation");
64 pthread_detach(pthread_self());