Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Thread idiom
From: strasser_at_[hidden]
Date: 2010-03-13 13:58:34


Zitat von anony <janezz55_at_[hidden]>:

> Is is possible to inherit from boost::thread and then store pointers to
> instantiated objects of such classes in say ptr_vector<>?

why inherit? you can store boost::thread's (or classes that contain a
boost::thread) in a ptr_vector.

>
> I need to interrupt() a specific thread now and then and once you commit
> a thread to thread_group you can only interrupt them all at once.

I don't understand why there even is a class thread_group.
it seems to me it was only intended to work around the fact that
thread's are non-Assignable, which is much better solved by
MoveAssignable in the future, and pointer containers or swap()ing in
the meantime.


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