L
Lars Uffmann
I'm a little at a loss here with the boost.thread documentation - I was
trying to find out if the thread class is destroyed upon thread
termination and I need to construct a new one for the next thread
execution of the same function, or if I can restart the old one. I
highly doubt a thread class can self-destruct, but I wanted to see when
the destructor was called. So I made a derived class myThread (or wanted
to) and I cannot seem to get the syntax for the constructor calling
thread::thread right.
So apart from looking for an answer as to how to re-execute a thread
that has ended, or if I have to delete the old one and create a new one,
I'm curious to know how to derive _any_ class from thread, with the
proper constructor syntax, equivalent to
----
class BOOST_THREAD_DECL thread : private noncopyable
{
public:
thread();
explicit thread(const function0<void>& threadfunc);
trying to find out if the thread class is destroyed upon thread
termination and I need to construct a new one for the next thread
execution of the same function, or if I can restart the old one. I
highly doubt a thread class can self-destruct, but I wanted to see when
the destructor was called. So I made a derived class myThread (or wanted
to) and I cannot seem to get the syntax for the constructor calling
thread::thread right.
So apart from looking for an answer as to how to re-execute a thread
that has ended, or if I have to delete the old one and create a new one,
I'm curious to know how to derive _any_ class from thread, with the
proper constructor syntax, equivalent to
----
class BOOST_THREAD_DECL thread : private noncopyable
{
public:
thread();
explicit thread(const function0<void>& threadfunc);