Boost logo

Boost :

Subject: [boost] [interprocess] Assign to shared_lock from scoped_lock
From: Chard (boost_at_[hidden])
Date: 2009-04-07 16:06:57

If I have (template args removed for brevity):

  shared_lock sh_lock(mutex);

  scoped_lock sc_lock(move(sh_lock), try_to_lock); // Try for exclusive
  if (sc_lock)
    sh_lock = move(sc_lock); // Drop back to shared *** not available

Should that assignment operator be available?

Currently I'm working around this with:


[or, alternatively: sh_lock = move(shared_lock(move(sc_lock))); ]

Boost list run by bdawes at, gregod at, cpdaniel at, john at