Boost logo

Boost Users :

Subject: Re: [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-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net