=nullptr) {old_head->next =std::shared_ptr();returnold_head->data;}returnstd::shared_ptr();}private:structNode{// std::make_shared does not throw an exception.Node(constT& input_data
NOTE: Additionally, the current implementation doesn't validate that the receivedstd::shared_ptrstores a valid instance, and just dereferences it. The current version of the code guarantees that the pointer is not going to benullptrbut this is not checked nor asserted. Using a reference explicit...
public: /** Return true if we should disconnect the peer for failing an inactivity check. */ bool ShouldRunInactivityChecks(const CNode& node, std::chrono::seconds now) const; bool MultipleManualOrFullOutboundConns(Network net) const EXCLUSIVE_LOCKS_REQUIRED(m_nodes_mutex); +...
*/ ReadPtr load() const { auto& local = *threadLocalCache_; std::lock_guard<folly::SpinLock> local_lock(local.lock); if (!local.ptr.hasValue()) { std::lock_guard<std::mutex> lock(mutex_); if (!masterPtr_) { local.ptr.emplace(nullptr); } else { // The following expres...
Search or jump to... Search code, repositories, users, issues, pull requests... Provide feedback We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches ...