/* * 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. */ #pragma once #include <stdint.h> #include <sys/types.h> #include <memory> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #include <folly/Function.h> #include <folly/Portability.h> #include <folly/Synchronized.h> #include <folly/portability/SysTypes.h> namespace folly { class RequestContext; /** * WorkerProvider is a simple interface that can be used * to collect information about worker threads that are pulling work * from a given queue. */ class WorkerProvider { … }; /** * Interface for executors that provide a WorkerProvider to collect thread ids. */ class GetThreadIdCollector { … }; class ThreadIdWorkerProvider : public WorkerProvider { … }; class QueueObserver { … }; class QueueObserverFactory { … }; MakeQueueObserverFactory; #if FOLLY_HAVE_WEAK_SYMBOLS FOLLY_ATTR_WEAK MakeQueueObserverFactory make_queue_observer_factory; #else constexpr MakeQueueObserverFactory* make_queue_observer_factory = …; #endif struct QueueInfo { … }; LaggingQueueInfoFunc; } // namespace folly