Boost logo

Boost :

Subject: [boost] Which Future library will be reviewed?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-12-03 00:37:51


Hi Anthony,

your current Boost.Future(http://www.justsoftwaresolutions.co.uk/files/n2561_future.hpp + http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2561.html) library is closer to the C++0x standard than the Boost.Future from Braddock.

This let me think that yours is a better candidate for Boost, but the current state of your library interface has some differences, restrictions and extensions respect to the standard http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2627.html and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2709.html

I know that you have implemented a prototype for an earlier version of n2676 available at http://www.justsoftwaresolutions.co.uk/threading/updated-implementation-of-c++-futures.html.

I would like to know which one will be reviewed? Do you plan to review your current Boost proposal and adapt it to the current C++0x proposal before the review. IMO, if you do that the review will be much more efficient.

The current documentation includes often the C++0x interface and not the C++98 emulation. Do you plan to add it? before the review?

In addition to the current reference, do you plan to add more documentation such as tutotial, examples, design rationale, implementation notes? before the review?

I think restrictions/extensions to the standard should be stated explicitly.
A comparaison of your implementation and the standard seems mandatory.
* How move semantics is emulated (restrictions)
* How the default constructed deleted functions are emulated (note that these are part of the interface)

Next follows some differences that need attention (from http://www.justsoftwaresolutions.co.uk/files/n2561_future.hpp)
=====
    private:
        unique_future& operator=(unique_future& rhs);// = delete;
versus
    public:
        unique_future& operator=(const unique_future& rhs) = delete;
=====
    wait_for, wait_until
versus
    timed_wait, timed_wait_until
=====
    shared_future & operator=(const shared_future& rhs) = delete;
versus
     shared_future& operator=(shared_future const& other);
===
    shared_future(const shared_future& rhs);
    shared_future(unique_future<R>);
    shared_future();
    shared_future & operator=(const shared_future& rhs) = delete;
Versus
    shared_future();
    ~shared_future();
    // copy support
    shared_future(shared_future const& other);
    shared_future& operator=(shared_future const& other);
=====
    template<class> class packaged_task; // undefined
    template<class R, class... ArgTypes>
    class packaged_task<R(ArgTypes...)> {
    public:
        typedef R result_type;

versus

    template<typename R>
    class packaged_task
    {

HTH for the review,
Vicente


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