I am new to multithreading so I'll try my best to explain my question.
I have created a test suite for my class and so far all the unit tests pass, while running on a single core CPU.
The object instantiated from this class will be use in a multithread application for which I will not have access to.
I'd like to run my unit tests in a multithreaded test framework to exercise my code to flush out any race condition etc.. associated with multithreading application.
On occasion, I will have access to dual quad-core machine to rerun those tests.
I would like to find out if there is a easy way to run my tests concurrently using multiple threads (possibly allowing me to specify the number of threads to create).
If the facility is not built into CPPUnit or the future CPPUnit2, is there a coding pattern I could use to achieve that? Possibly using things like Boost::Thread.
I am after a simple framework so that I can roll out the technique to other colleagues of mine.
The plan is to not only run the unit test but run them in a multithreading environment to exercise the non-deterministic nature and how it might cause problem in the code we develop,
Regards
Nicholas Yue
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am new to multithreading so I'll try my best to explain my question.
I have created a test suite for my class and so far all the unit tests pass, while running on a single core CPU.
The object instantiated from this class will be use in a multithread application for which I will not have access to.
I'd like to run my unit tests in a multithreaded test framework to exercise my code to flush out any race condition etc.. associated with multithreading application.
On occasion, I will have access to dual quad-core machine to rerun those tests.
I would like to find out if there is a easy way to run my tests concurrently using multiple threads (possibly allowing me to specify the number of threads to create).
If the facility is not built into CPPUnit or the future CPPUnit2, is there a coding pattern I could use to achieve that? Possibly using things like Boost::Thread.
I am after a simple framework so that I can roll out the technique to other colleagues of mine.
The plan is to not only run the unit test but run them in a multithreading environment to exercise the non-deterministic nature and how it might cause problem in the code we develop,
Regards
Nicholas Yue