folly/folly/executors/IOThreadPoolExecutor.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/executors/IOThreadPoolExecutor.h>

#include <glog/logging.h>

#include <folly/detail/MemoryIdler.h>
#include <folly/portability/GFlags.h>

FOLLY_GFLAGS_DEFINE_bool();

namespace folly {

namespace {

MemoryIdler;

/* Class that will free jemalloc caches and madvise the stack away
 * if the event loop is unused for some period of time
 */
class MemoryIdlerTimeout : public AsyncTimeout, public EventBase::LoopCallback {};

} // namespace

// IOThreadPoolExecutorBase
EventBase* IOThreadPoolExecutor::getEventBase(
    ThreadPoolExecutor::ThreadHandle* h) {}

// IOThreadPoolExecutor
IOThreadPoolExecutor::IOThreadPoolExecutor(
    size_t numThreads,
    std::shared_ptr<ThreadFactory> threadFactory,
    EventBaseManager* ebm,
    Options options)
    :{}

IOThreadPoolExecutor::IOThreadPoolExecutor(
    size_t maxThreads,
    size_t minThreads,
    std::shared_ptr<ThreadFactory> threadFactory,
    EventBaseManager* ebm,
    Options options)
    :{}

IOThreadPoolExecutor::~IOThreadPoolExecutor() {}

void IOThreadPoolExecutor::add(Func func) {}

void IOThreadPoolExecutor::add(
    Func func, std::chrono::milliseconds expiration, Func expireCallback) {}

std::shared_ptr<IOThreadPoolExecutor::IOThread>
IOThreadPoolExecutor::pickThread() {}

EventBase* IOThreadPoolExecutor::getEventBase() {}

std::vector<Executor::KeepAlive<EventBase>>
IOThreadPoolExecutor::getAllEventBases() {}

EventBaseManager* IOThreadPoolExecutor::getEventBaseManager() {}

std::shared_ptr<ThreadPoolExecutor::Thread> IOThreadPoolExecutor::makeThread() {}

void IOThreadPoolExecutor::threadRun(ThreadPtr thread) {}

// threadListLock_ is writelocked
void IOThreadPoolExecutor::stopThreads(size_t n) {}

// threadListLock_ is readlocked
size_t IOThreadPoolExecutor::getPendingTaskCountImpl() const {}

void IOThreadPoolExecutor::handleObserverRegisterThread(
    ThreadHandle* h, Observer& observer) {}

void IOThreadPoolExecutor::handleObserverUnregisterThread(
    ThreadHandle* h, Observer& observer) {}

} // namespace folly