48 #include <visp3/core/vpMutex.h>
49 #include <visp3/core/vpThread.h>
51 #if defined(VISP_HAVE_PTHREAD) || (defined(_WIN32) && !defined(WINRT_8_0))
59 unsigned int thread_id = *((
unsigned int *) args);
61 std::cout <<
"Started job " << thread_counter <<
" with id " << thread_id << std::endl;
63 for(
unsigned long i=0; i<(0xFFFF);i++) {};
65 std::cout <<
"Ended job " << thread_counter << std::endl;
75 unsigned int nthread=10;
77 unsigned int *thread_id =
new unsigned int [nthread];
79 for(
unsigned int i=0; i<nthread; i++)
94 # if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))) // UNIX
95 std::cout <<
"You should enable pthread usage and rebuild ViSP..." << std::endl;
97 std::cout <<
"Multi-threading seems not supported on this platform" << std::endl;
void create(vpThread::Fn fn, vpThread::Args args=NULL)