Synchronized::exchange
authorYedidya Feldblum <yfeldblum@fb.com>
Fri, 5 Jan 2018 22:23:31 +0000 (14:23 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 5 Jan 2018 22:50:36 +0000 (14:50 -0800)
commit881088fc0341608999b30d8d06573b86f37daa42
treeeee4989dfef861680610945ccb0b992dc9561037
parent18b6a2dd5e494d89ff670a5a7bc186d89a8690a5
Synchronized::exchange

Summary:
[Folly] `Synchronized::exchange`, for assigning a new value and returning the old value.

(Note: this ignores all push blocking failures!)

Differential Revision: D6653482

fbshipit-source-id: 68f4bd330bc2cf37bb92aff98b8ce3221334112e
folly/Synchronized.h
folly/test/SynchronizedTest.cpp
folly/test/SynchronizedTestLib-inl.h