46 #include <visp3/core/vpConfig.h>
48 #if defined(VISP_HAVE_PTHREAD) || (defined(_WIN32) && !defined(WINRT_8_0))
53 #include <visp3/core/vpThread.h>
54 #include <visp3/core/vpTime.h>
72 unsigned int args_ = *((
unsigned int *) args);
73 std::cout <<
"qux arg: " << args_ << std::endl;
80 unsigned int qux_arg = 12;
86 std::cout <<
"Joinable after construction:" << std::endl;
87 std::cout <<
"foo: " << foo.
joinable() << std::endl;
88 std::cout <<
"bar: " << bar.joinable() << std::endl;
89 std::cout <<
"qux: " << qux.joinable() << std::endl;
93 std::cout <<
"Joinable after creation:" << std::endl;
94 std::cout <<
"foo: " << foo.
joinable() << std::endl;
95 std::cout <<
"bar: " << bar.joinable() << std::endl;
96 std::cout <<
"qux: " << qux.joinable() << std::endl;
99 if (bar.joinable()) bar.join();
100 if (qux.joinable()) qux.join();
102 std::cout <<
"Joinable after joining:" << std::endl;
103 std::cout <<
"foo: " << foo.
joinable() << std::endl;
104 std::cout <<
"bar: " << bar.joinable() << std::endl;
105 std::cout <<
"qux: " << qux.joinable() << std::endl;
117 # if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))) // UNIX
118 std::cout <<
"You should enable pthread usage and rebuild ViSP..." << std::endl;
120 std::cout <<
"Multi-threading seems not supported on this platform" << std::endl;
VISP_EXPORT int wait(double t0, double t)
void create(vpThread::Fn fn, vpThread::Args args=NULL)