Boost logo

Boost Users :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-01-10 14:48:21


Ovanes Markarian <om_boost <at> keywallet.com> writes:
> struct thread_safety_test
> {
> static void thread_function(boost::barrier& b)
> {
> b.wait();

Can't comment in these. I never used this class.

| boost::mutex::scoped_lock lock(m);
| BOOST_CHECK_EQUAL(1,0);
| }
|
| void test_multiple_assertion_faults()
| {
| boost::thread_group tg;
| boost::barrier b(100);
|
| for(size_t i=0; i<100; ++i)
| {
| tg.create_thread(boost::bind(thread_function, ref(b)));
| }
| }
| };
| But unfortunately this does not work. May be I miss smth. here.

I am not an expert in MT, but what exactly is the problem?

Do you run is from inside the test case?

Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net