44 #include <visp3/core/vpConfig.h>
46 #if defined(VISP_HAVE_PTHREAD) || (defined(_WIN32) && !defined(WINRT_8_0))
51 #include <visp3/core/vpMutex.h>
52 #include <visp3/core/vpThread.h>
53 #include <visp3/core/vpTime.h>
73 unsigned int args_ = *((
unsigned int *)args);
75 std::cout <<
"qux arg: " << args_ << std::endl;
83 unsigned int qux_arg = 12;
91 std::cout <<
"Joinable after construction:" << std::endl;
92 std::cout <<
"foo: " << foo.
joinable() << std::endl;
93 std::cout <<
"bar: " << bar.joinable() << std::endl;
94 std::cout <<
"qux: " << qux.joinable() << std::endl;
100 std::cout <<
"Joinable after creation:" << std::endl;
101 std::cout <<
"foo: " << foo.
joinable() << std::endl;
102 std::cout <<
"bar: " << bar.joinable() << std::endl;
103 std::cout <<
"qux: " << qux.joinable() << std::endl;
114 std::cout <<
"Joinable after joining:" << std::endl;
115 std::cout <<
"foo: " << foo.
joinable() << std::endl;
116 std::cout <<
"bar: " << bar.joinable() << std::endl;
117 std::cout <<
"qux: " << qux.joinable() << std::endl;
130 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
131 std::cout <<
"You should enable pthread usage and rebuild ViSP..." << std::endl;
133 std::cout <<
"Multi-threading seems not supported on this platform" << std::endl;
void create(vpThread::Fn fn, vpThread::Args args=nullptr)
VISP_EXPORT int wait(double t0, double t)