/// raw storage, only 1..min(size_,actualCapacity_) (inclusive) are
/// actually constructed. Note that slots_[0] is not constructed or used
- Slot* FOLLY_ALIGN_TO_AVOID_FALSE_SHARING slots_;
+ FOLLY_ALIGN_TO_AVOID_FALSE_SHARING Slot* slots_;
/// use AccessSpreader to find your list. We use stripes instead of
/// thread-local to avoid the need to grow or shrink on thread start
/// this is the head of a list of node chained by globalNext, that are
/// themselves each the head of a list chained by localNext
- AtomicStruct<TaggedPtr,Atom> FOLLY_ALIGN_TO_AVOID_FALSE_SHARING globalHead_;
+ FOLLY_ALIGN_TO_AVOID_FALSE_SHARING AtomicStruct<TaggedPtr,Atom> globalHead_;
///////////// private methods
private:
- folly::AtomicStruct<LifoSemHead,Atom> head_
- FOLLY_ALIGN_TO_AVOID_FALSE_SHARING;
+ FOLLY_ALIGN_TO_AVOID_FALSE_SHARING
+ folly::AtomicStruct<LifoSemHead,Atom> head_;
char padding_[folly::detail::CacheLocality::kFalseSharingRange -
sizeof(LifoSemHead)];
// should be considered that there is a shared lock on that instance.
// See kTokenless.
typedef Atom<uintptr_t> DeferredReaderSlot;
- static DeferredReaderSlot deferredReaders
+ FOLLY_ALIGN_TO_AVOID_FALSE_SHARING static DeferredReaderSlot deferredReaders
[kMaxDeferredReaders *
- kDeferredSeparationFactor] FOLLY_ALIGN_TO_AVOID_FALSE_SHARING;
+ kDeferredSeparationFactor];
// Performs an exclusive lock, waiting for state_ & waitMask to be
// zero first
/// by then), and it is active (active by default).
///
/// Inactive Futures will activate upon destruction.
- Future<T>& activate() & DEPRECATED {
+ DEPRECATED Future<T>& activate() & {
core_->activate();
return *this;
}
- Future<T>& deactivate() & DEPRECATED {
+ DEPRECATED Future<T>& deactivate() & {
core_->deactivate();
return *this;
}
- Future<T> activate() && DEPRECATED {
+ DEPRECATED Future<T> activate() && {
core_->activate();
return std::move(*this);
}
- Future<T> deactivate() && DEPRECATED {
+ DEPRECATED Future<T> deactivate() && {
core_->deactivate();
return std::move(*this);
}
p.setException(std::current_exception());
}
*/
- void setException(std::exception_ptr const&) DEPRECATED;
+ DEPRECATED void setException(std::exception_ptr const&);
/** Fulfill the Promise with an exception type E, which can be passed to
std::make_exception_ptr(). Useful for originating exceptions. If you
p.setException(std::current_exception());
}
*/
- void setException(std::exception_ptr const&) DEPRECATED;
+ DEPRECATED void setException(std::exception_ptr const&);
/** Fulfill the SharedPromise with an exception type E, which can be passed to
std::make_exception_ptr(). Useful for originating exceptions. If you
*
* @param ep The exception_pointer. Will be rethrown.
*/
- explicit Try(std::exception_ptr ep) DEPRECATED
+ DEPRECATED explicit Try(std::exception_ptr ep)
: contains_(Contains::EXCEPTION) {
try {
std::rethrow_exception(ep);
*
* @param ep The exception_pointer. Will be rethrown.
*/
- explicit Try(std::exception_ptr ep) DEPRECATED : hasValue_(false) {
+ DEPRECATED explicit Try(std::exception_ptr ep) : hasValue_(false) {
try {
std::rethrow_exception(ep);
} catch (const std::exception& e) {
///
/// auto f = makeFuture<string>(std::current_exception());
template <class T>
-Future<T> makeFuture(std::exception_ptr const& e) DEPRECATED;
+DEPRECATED Future<T> makeFuture(std::exception_ptr const& e);
/// Make a failed Future from an exception_wrapper.
template <class T>