Add a check if max atomic_shared_ptrs is reached.
authorDave Watson <davejwatson@fb.com>
Tue, 9 Jan 2018 15:30:49 +0000 (07:30 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 9 Jan 2018 15:35:44 +0000 (07:35 -0800)
commit6824c36bf128aa415a802b66e93a5019b8e16c25
tree310c264c719bb725ec770c3f2c13bcb17cbf59a5
parent4591832b4885f166236acee689dd2b11e3b3135b
Add a check if max atomic_shared_ptrs is reached.

Summary:
Batching reference counts reduces the maximum number of atomic_shared_ptrs
available to the system (and also shared_ptrs).

Add a check, test, and some comments about it.

Reviewed By: yfeldblum

Differential Revision: D5916291

fbshipit-source-id: 0bbf7b43284d94a304201219883c82b3654c1585
folly/concurrency/detail/AtomicSharedPtr-detail.h
folly/concurrency/test/AtomicSharedPtrTest.cpp