]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/tsmthred.h
1 /********************************************************************
3 * Copyright (c) 1997-2003, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
8 #ifndef MULTITHREADTEST_H
9 #define MULTITHREADTEST_H
15 Test multithreading. Of course we need a thread class first..
16 this wrapper has a ported implementation.
23 virtual ~SimpleThread();
24 int32_t start(void); // start the thread
25 public: // should be private, but then we couldn't be asocial.
26 virtual void run(void) = 0; // Override this to provide some real implementation
28 void *fImplementation
;
31 static void sleep(int32_t millis
); // probably shouldn't go here but oh well.
36 * Tests actual threading
38 class MultithreadTest
: public IntlTest
42 virtual ~MultithreadTest();
44 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
47 * test that threads even work
49 void TestThreads(void);
51 * test that mutexes work
54 #if !UCONFIG_NO_FORMATTING
56 * test that intl functions work in a multithreaded context
58 void TestThreadedIntl(void);
60 void TestCollators(void);