Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [thread] synchronized_value: value and move semantics
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2013-06-08 12:48:38


Looks like I could have wrote:

  void add( std::shared<Bar> bar )
        {
            m_work_queue.push( [this, bar]{
                m_bars.emplace_back( bar );
                m_content->bar_id_list.emplace_back( bar->id() ); //
simplified
            });
        }

       void rename( std::string new_name )
       {
           m_work_queue.push( [this, new_name]{
               m_info->name = new_name; // simplified
           });
       }

Which is even better.

Now I have a question:
Should the current (1.54.0 beta) version of synchronized_value work with
multiple-readers-single-writer mutexes?

Joel Lamotte


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