folly/folly/futures/detail/Core.cpp

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <folly/futures/detail/Core.h>

#include <new>

#include <fmt/core.h>
#include <folly/Utility.h>
#include <folly/lang/Assume.h>

namespace folly {
namespace futures {
namespace detail {

namespace {

template <class Enum>
void terminate_unexpected_state(fmt::string_view context, Enum state) {}

} // namespace

void UniqueDeleter::operator()(DeferredExecutor* ptr) {}

KeepAliveOrDeferred::KeepAliveOrDeferred(KeepAliveOrDeferred&& other) noexcept
    :{}

KeepAliveOrDeferred::~KeepAliveOrDeferred() {}

KeepAliveOrDeferred& KeepAliveOrDeferred::operator=(
    KeepAliveOrDeferred&& other) noexcept {}

DeferredExecutor* KeepAliveOrDeferred::getDeferredExecutor() const noexcept {}

Executor* KeepAliveOrDeferred::getKeepAliveExecutor() const noexcept {}

KeepAliveOrDeferred::KA KeepAliveOrDeferred::stealKeepAlive() && noexcept {}

KeepAliveOrDeferred::DW KeepAliveOrDeferred::stealDeferred() && noexcept {}

KeepAliveOrDeferred KeepAliveOrDeferred::copy() const {}

/* explicit */ operator bool()

void DeferredExecutor::addFrom(
    Executor::KeepAlive<>&& completingKA,
    Executor::KeepAlive<>::KeepAliveFunc func) {}

Executor* DeferredExecutor::getExecutor() const {}

void DeferredExecutor::setExecutor(
    folly::Executor::KeepAlive<> executor, bool inlineUnsafe) {}

void DeferredExecutor::setNestedExecutors(
    std::vector<DeferredWrapper> executors) {}

void DeferredExecutor::detach() {}

DeferredWrapper DeferredExecutor::copy() {}

/* static */ DeferredWrapper DeferredExecutor::create() {}

DeferredExecutor::DeferredExecutor() {}

void DeferredExecutor::acquire() {}

void DeferredExecutor::release() {}

InterruptHandler::~InterruptHandler() = default;

void InterruptHandler::acquire() {}

void InterruptHandler::release() {}

bool CoreBase::hasResult() const noexcept {}

DeferredWrapper CoreBase::stealDeferredExecutor() {}

void CoreBase::raise(exception_wrapper e) {}

void CoreBase::initCopyInterruptHandlerFrom(const CoreBase& other) {}

class CoreBase::CoreAndCallbackReference {};

CoreBase::~CoreBase() {}

void CoreBase::setCallback_(
    Callback&& callback,
    std::shared_ptr<folly::RequestContext>&& context,
    futures::detail::InlineContinuation allowInline) {}

void CoreBase::setResult_(Executor::KeepAlive<>&& completingKA) {}

void CoreBase::setProxy_(CoreBase* proxy) {}

// May be called at most once.
void CoreBase::doCallback(
    Executor::KeepAlive<>&& completingKA, State priorState) {}

void CoreBase::proxyCallback(State priorState) {}

void CoreBase::detachOne() noexcept {}

void CoreBase::derefCallback() noexcept {}

bool CoreBase::destroyDerived() noexcept {}

#if FOLLY_USE_EXTERN_FUTURE_UNIT
template class Core<folly::Unit>;
#endif

} // namespace detail
} // namespace futures
} // namespace folly