move assignment operators for folly::Synchronized
authorPhilip Pronin <philipp@fb.com>
Fri, 5 Jul 2013 03:01:37 +0000 (20:01 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 9 Jul 2013 19:05:34 +0000 (12:05 -0700)
commitca5621faf0871fa56f16754f03032cd03e03d4b1
treeacbdff2535651750b838ae3553a4910a2a751f19
parentb1463f8f7e68895866b62913997423feb338aeb1
move assignment operators for folly::Synchronized

Summary:
* added move assignment operators,
* fixed `operator=(const Synchronized& rhs)` (it had a typo),
* fixed deadlock on self-assignment,
* changed `swap` to call `swap(lhs.datum_, rhs.datum_)` instead of `lhs.datum_.swap(rhs.datum_)`.

Test Plan: fbconfig -r folly/test && fbmake opt -j32 && fbmake runtests_opt

Reviewed By: delong.j@fb.com

FB internal diff: D875977
folly/Synchronized.h
folly/docs/Synchronized.md