Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-06-27 12:08:48


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();
    };


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