|
Boost Users : |
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-01-10 14:05:33
If I correclty understood you I should do smth. similar like this:
boost::mutex m;
struct thread_safety_test
{
static void thread_function(boost::barrier& b)
{
b.wait();
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.
With Kind Regards,
Ovanes
On Jan 10, 2008 8:01 PM, Ovanes Markarian <om_boost_at_[hidden]> wrote:
> Thanks for the answer!
>
> I read some post (mainly: you and William Kempf) about Program Execution
> Monitor and its MT support. This was in 2002/2003 did you manage to solve
> these issues?
>
>
> Many thanks,
> Ovanes
>
>
>
> On Jan 10, 2008 7:47 PM, Gennadiy Rozental <rogeeff_at_[hidden]> wrote:
>
> > Ovanes Markarian <om_boost <at> keywallet.com> writes:
> >
> > >
> > > Hello,is Boost.Test framework thread safe in regards to the following
> > use
> > case:I would like to start multiple threads with some testing tasks.
> > These
> > threads will call boost TestTools functions (BOOST_CHECK... etc.). Is
> > this
> > scenario supported?
> >
> > No. You will have ti serialize access to the UTF. The simplest way is
> > just use
> > wrapper macro.
> >
> > gennadiy
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
>
>
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