X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/f3c0d7a59d99c2a94c6b8822291f0e42be3773c9..3d1f044b704633e2e541231cd17ae9ecf9ad5c7a:/icuSources/test/intltest/simplethread.h diff --git a/icuSources/test/intltest/simplethread.h b/icuSources/test/intltest/simplethread.h old mode 100644 new mode 100755 index 9fcb52a1..fae418dc --- a/icuSources/test/intltest/simplethread.h +++ b/icuSources/test/intltest/simplethread.h @@ -9,20 +9,29 @@ #ifndef SIMPLETHREAD_H #define SIMPLETHREAD_H -#include "mutex.h" +#include +#include "unicode/utypes.h" -class U_EXPORT SimpleThread +/* + * Simple class for creating threads in ICU tests. + * Originally created to provide a portable abstraction over platform + * (POSIX or Win32) threading interfaces. + * + * New threaded tests should consider skipping this class and directly using C++ std library + * threading functions. SimpleThread is retained primarily to support existing use. + */ +class SimpleThread { public: SimpleThread(); virtual ~SimpleThread(); - int32_t start(void); // start the thread. Return 0 if successfull. + int32_t start(); // start the thread. Return 0 if successfull. void join(); // A thread must be joined before deleting its SimpleThread. - virtual void run(void) = 0; // Override this to provide the code to run + virtual void run() = 0; // Override this to provide the code to run // in the thread. private: - void *fImplementation; + std::thread fThread = {}; }; @@ -76,4 +85,3 @@ class ThreadPool : public ThreadPoolBase { } }; #endif -