Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-06-27 13:07:33


At 01:08 PM 6/27/2001, Greg Colvin wrote:
>For the reasons Peter and I have laid out I still prefer:
>
> namespace thread {
>
> struct ref {
>
> // ref is copyable, and all copies compare ==
> ref(const ref& other);
> ref& operator=(const ref& other);
> bool operator==(const ref& other) const;
> bool operator!=(const ref& other) const;
>
> // To allow us to not need current(), at least for
> // comparison. Not needed if we have current().
> bool is_current() const;
>
> bool is_alive() const;
>
> // Waits for the thread to finish
> void join();
> };
>
> // maybe don't need this if we have ref::is_current()
> ref current() const;
>
> ref create(detail::threadproc proc); // Starts the thread
>
> void sleep(const xtime& xt);
> void yield();
> };

What about detach()?

What about ~ref()?

Was the omission of these deliberate? (Just curious:-)

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk