Namespaces
Name |
Description |
Example code demonstrating the Folly logging library. |
|
The {fmt} formatting library namespace. |
|
include or backport: * std::invoke * std::invoke_result * std::invoke_result_t * std::is_invocable * std::is_invocable_v * std::is_invocable_r * std::is_invocable_r_v * std::is_nothrow_invocable * std::is_nothrow_invocable_v * std::is_nothrow_invocable_r * std::is_nothrow_invocable_r_v |
|
The range‐v3 library namespace. |
|
Standard library specializations of std::hash for Folly and standard types. |
Types
Name |
Description |
Test helper granting access to DynamicRingQueue internals. |
|
A completion queue entry (CQE) from the liburing C API. |
|
A submission queue entry (SQE) from the liburing C API. |
|
Linux openat2 syscall options structure. |
|
The dynamic linker's debug rendezvous structure. |
Type Aliases
Name |
Description |
Portable alias for the system |
Macros
Name |
Description |
Introduces a benchmark function. Use with either one or two arguments. The first is the name of the benchmark. Use something descriptive, such as insertVectorBegin. The second argument may be missing, or could be a symbolic counter. The counter dictates how many internal iteration the benchmark does. Example: |
|
Allow users to record customized counter during benchmarking, there will be one extra column showing in the output result for each counter |
|
Like BENCHMARK_NAMED_PARAM, but passes a UserCounters& parameter to the benchmark function for recording custom counters. |
|
Like BENCHMARK_PARAM, but passes a UserCounters& parameter. |
|
Draws a line of dashes. |
|
Prints arbitrary text. |
|
Introduces a benchmark function. Used internally, see BENCHMARK and friends below. |
|
Like BENCHMARK above, but allows the user to return the actual number of iterations executed in the function body. This can be useful if the benchmark function doesn't know upfront how many iterations it's going to run or if it runs through a certain number of test cases, e.g.: |
|
Introduces a benchmark function with support for returning the actual number of iterations. Used internally, see BENCHMARK_MULTI and friends below. |
|
Same as BENCHMARK_NAMED_PARAM, but allows one to return the actual number of iterations that have been run. |
|
Defines a benchmark that passes a parameter to another one. This is common for benchmarks that need a "problem size" in addition to "number of iterations". Consider: |
|
Same as BENCHMARK_PARAM, but allows one to return the actual number of iterations that have been run. |
|
Just like BENCHMARK, but prints the time relative to a baseline. The baseline is the most recent BENCHMARK() seen in the current scope. Example: |
|
Same as BENCHMARK_RELATIVE, but allows one to return the actual number of iterations that have been run. |
|
A combination of BENCHMARK_RELATIVE and BENCHMARK_NAMED_PARAM. |
|
|
Same as BENCHMARK_RELATIVE_NAMED_PARAM, but allows one to return the actual number of iterations that have been run. |
A combination of BENCHMARK_RELATIVE and BENCHMARK_PARAM. |
|
Same as BENCHMARK_RELATIVE_PARAM, but allows one to return the actual number of iterations that have been run. |
|
Allows execution of code that doesn't count toward the benchmark's time budget. Example: |
|
If cond is not true, raise an exception of type E. E must have a ctor that works with const char* (a description of the failure). |
|
Easy PCRE regex matching. Note that pattern must match the ENTIRE target, so use .* at the start and end of the pattern, as appropriate. See http://regex101.com/ for a PCRE simulator. |
|
Helper macro that extracts the first argument out of a list of any number of arguments. |
|
Log a message to the specified logger. |
|
Log a message to the specified logger, using a fmt::format() string. |
|
FB_LOGF_RAW() is similar to FB_LOG_RAW(), but formats the log arguments using fmt::format(). |
|
Issues a LOG(severity) no more often than every milliseconds. Example: |
|
Helper macro for implementing FB_LOG() and FB_LOGF(). |
|
FB_LOG_RAW() can be used by callers that want to pass in the log level as a variable, and/or who want to explicitly specify the filename and line number. |
|
Helper macro for implementing FB_LOG_RAW() and FB_LOGF_RAW(). |
|
Comparison: ‐ Forwards to underlying PtrT. ‐ Works when one of the operands is not not_null. ‐ Works when one of the operands is nullptr. |
|
FB_ONE_OR_NONE(hello, world) expands to hello and FB_ONE_OR_NONE(hello) expands to nothing. This macro is used to insert or eliminate text based on the presence of another argument. |
|
Helper macro that provides a way to pass argument with commas in it to some other macro whose syntax doesn't allow using extra parentheses. Example: |
|
Concatenate two preprocessor tokens by juxtaposition, forcing an extra expansion pass. |
|
The FOLLY_ASSUME_FBVECTOR_COMPATIBLE* macros below encode the assumption that the type is relocatable per IsRelocatable above. Many types can be assumed to satisfy this condition, but it is the responsibility of the user to state that assumption. User‐defined classes will not be optimized for use with fbvector (see FBVector.h) unless they state that assumption. |
|
Use this macro ONLY inside namespace folly. When using it with a regular type, use it like this: |
|
Inform the compiler that the statement is not reachable at runtime, and disable compiler warnings. |
|
|
Added here so users of folly can figure out whether the header folly/compression/CompressionContextPoolSingletons.h is present, and therefore whether it can be included. |
* FOLLY_CREATE_FREE_INVOKER |
|
* FOLLY_CREATE_FREE_INVOKER_SUITE |
|
* FOLLY_CREATE_MEMBER_ACCESSOR |
|
|
* FOLLY_CREATE_MEMBER_ACCESSOR_SUITE |
* FOLLY_CREATE_MEMBER_INVOKER |
|
|
* FOLLY_CREATE_MEMBER_INVOKER_SUITE |
* FOLLY_CREATE_QUAL_INVOKER |
|
* FOLLY_CREATE_QUAL_INVOKER_SUITE |
|
|
* FOLLY_CREATE_STATIC_MEMBER_INVOKER |
|
* FOLLY_CREATE_STATIC_MEMBER_INVOKER_SUITE |
FOLLY_DECLARE_REUSED |
|
|
Any file constructing |
C++ switch‐case statements enable writing conditional statements that are checked for exhaustiveness by the compiler. However, C++ compilers don't enforce exhaustiveness very well. These macros enable you to explicitly opt into truly exhaustive switch‐cases, that are useful for scenarios where you may want to deal with enums that are inputs, rather than internal invariants. |
|
GTest predicate asserting two JSON strings are equal documents. |
|
GTest predicate asserting two JSON strings are equal within a tolerance. |
|
|
GTest predicate asserting two JSON strings are equal, comparing one level of nested JSON‐in‐string. |
FOLLY_FOR_EACH_THIS_OVERLOAD_IN_CLASS_BODY_DELEGATE |
|
Helper macro that just ignores its parameters. |
|
A helper macro to set the default logging configuration in a program. |
|
* FOLLY_INVOKE_MEMBER |
|
* FOLLY_INVOKE_QUAL |
|
Treat the condition as likely. |
|
FOLLY_PP_FOR_EACH |
|
Use FOLLY_PP_STRINGIZE(x) when you'd want to do what #x does inside another macro expansion. |
|
Use FOLLY_PP_STRINGIZE_MACRO(x) when you want the string representation of a non‐string c++ preprocessing macro value, ex FOLLY_PP_STRINGIZE_MACRO(LINE). |
|
Helper macro that just ignores its parameters and inserts a semicolon. |
|
Accesses a defined setting. Rationale for the macro: 1) Searchability, all settings access is done via FOLLY_SETTING(...) 2) Prevents omitting trailing () by accident, which could lead to bugs like |
|
Declares a setting that's defined elsewhere. |
|
Defines a setting. |
|
Registers a setting without defining an Accessor. This should rarely be used directly and most use cases will want FOLLY_SETTING_DEFINE instead. |
|
Treat the condition as unlikely. |
|
Capture code that shall be run when the current scope exits. |
|
Capture code to run if the scope exits with an exception. |
|
Capture code to run if the scope exits without an exception. |
|
Sets a specific tcp personality Available only on kernels 3.2 and greater |
|
NOTE: This API is deprecated. Use lock(), wlock(), rlock() or the withLock functions instead. In the future it will be marked with a deprecation attribute to emit build‐time warnings, and then it will be removed entirely. |
|
NOTE: This API is deprecated. Use lock(), wlock(), rlock() or the withLock functions instead. In the future it will be marked with a deprecation attribute to emit build‐time warnings, and then it will be removed entirely. |
|
NOTE: This API is deprecated. Use lock(), wlock(), rlock() or the withLock functions instead. In the future it will be marked with a deprecation attribute to emit build‐time warnings, and then it will be removed entirely. |
|
Disambiguate the name var by concatenating the line number of the original point of expansion. This avoids shadowing warnings for nested SYNCHRONIZEDs. The name is consistent if used multiple times within another macro. Only for internal use. |
|
Assert that a condition is true. |
|
Assert a comparison relationship between two arguments. |
|
Assert that a condition is true in debug builds only. |
|
Assert a comparison relationship between two arguments in debug builds. |
|
Log a message to this file's default log category, using a format string. |
|
Similar to XLOGF(...) except only log a message every |
|
Similar to XLOGF(...) except only log a message every |
|
Similar to XLOGF(...) except log a message if the specified condition predicate evaluates to true or every |
|
Similar to XLOGF(...) except only log a message every |
|
Similar to XLOGF(...) except only log a message every |
|
Similar to XLOGF(...) except it logs a message if the condition predicate evaluates to true or approximately every |
|
Similar to XLOGF(...) except only log a message the first n times, exactly. |
|
Log a message using a format string if and only if the specified condition predicate evaluates to true. Note that the condition is only evaluated if the log‐level check passes. |
|
Helper macro used to implement XLOG() and XLOGF() |
|
Similar to XLOG(...) except only log a message every |
|
Similar to XLOG(...) except only log a message every |
|
Similar to XLOG(...) except log a message if the specified condition predicate evaluates to true or every |
|
Similar to XLOG(...) except only log a message every |
|
Similar to XLOG(...) except only log a message every |
|
Similar to XLOG(...) except only log a message every |
|
Similar to XLOG(...) except it logs a message if the condition predicate evaluates to true or approximately every |
|
Similar to XLOG(...) except only log a message every |
|
Similar to XLOG(...) except only log a message the first n times, exactly. |
|
Get a pointer to the LogCategory that will be used by XLOG() statements in this file. |
|
Get the name of the log category that will be used by XLOG() statements in this file. |
|
Log a message if and only if the specified condition predicate evaluates to true. Note that the condition is only evaluated if the log‐level check passes. |
|
Check if an XLOG() statement with the given log level would be enabled. |
|
Expects a fully qualified LogLevel enum value. |
|
Helper macro to implement of XLOG_IS_ON() |
|
Similar to XLOG(...) except only log at most |
|
Forms a local variable name from "FOR_EACH_", |
example namespace
Example code demonstrating the Folly logging library.
Types
Name |
Description |
Example object that logs to the folly.logging.example.lib category. |
fmt namespace
The {fmt} formatting library namespace.
Types
Name |
Description |
{fmt} formatter specialization for folly::StringPiece. |
|
Formats an |
|
|
|
Formatter specialization that formats an |
|
{fmt} formatter specialization that formats fbstring as a string view. |
|
|
|
|
|
Formats a |
|
|
|
|
|
|
fmt formatter specialization for reproducible_accumulator. |
|
Formatter specialization for basic_cstring_view, reusing string_view formatting. |
folly namespace
include or backport: * std::invoke * std::invoke_result * std::invoke_result_t * std::is_invocable * std::is_invocable_v * std::is_invocable_r * std::is_invocable_r_v * std::is_nothrow_invocable * std::is_nothrow_invocable_v * std::is_nothrow_invocable_r * std::is_nothrow_invocable_r_v
Namespaces
Name |
Description |
Implementation helpers for make_array and make_array_with. |
|
Implementation details. |
|
READ ME: The docs for this library are in |
|
Implementation details for BitIterator. |
|
BSER binary serialization for dynamic values. |
|
Internal implementation details for ConcurrentBSkipList. |
|
Sender/receiver channel primitives for asynchronous value streams. |
|
Time‐related wrappers and clock utilities. |
|
Compression and decompression codecs over IOBufs. |
|
Coroutine primitives and combinators. |
|
Cryptographic hashing primitives. |
|
Implementation details of the |
|
Implementation details. |
|
Implementation details for dynamic. |
|
Implementation details for DynamicConverter and DynamicConstructor. |
|
Facilities for capturing and stacking exception stack traces. |
|
Implementation details for folly::Expected. |
|
Namespace for experimental Folly components. |
|
Extension namespace for library authors, a public analog of |
|
Vendored third‐party code adapted for use in Folly. |
|
Implementation details for the F14 hash table family. |
|
A fallback implementation used when the standard trait is unavailable. |
|
Implementation details for fbstring. |
|
Lightweight cooperative userspace threads (fibers) and related primitives. |
|
Portable wrappers and imports for file‐descriptor operations. |
|
Implementation details. |
|
Implementation details for folly::findFixed. |
|
The user should return loop_break and loop_continue if they want to iterate in such a way that they can preemptively stop the loop and break out when certain conditions are met. |
|
Utilities for all format value specializations. |
|
Portable filesystem imports selecting the available |
|
Futures‐based asynchronous programming primitives. |
|
Lazy sequence generators and pipeline operators. |
|
Minimal stand‐in for the gflags namespace when gflags is unavailable. |
|
Hashing algorithms and helpers. |
|
Implementation details of the folly invocation traits. |
|
Cursor and queue utilities for reading and writing IOBuf chains. |
|
JSON parsing and serialization utilities. |
|
JSON Schema (draft v4) validation utilities. |
|
Implementation details for libc++ bitset support. |
|
Folly's logging library. |
|
Memory management utilities. |
|
Internal namespace hosting the copy/move control base types. |
|
Cross‐platform socket operation wrappers. |
|
numbers |
|
Folly's observer library. |
|
Implementation details. |
|
Utilities for storing data aligned on block (possibly cache‐line) boundaries, with optional padding. |
|
Aliases that use a polymorphic allocator. |
|
Interfaces and helpers for the |
|
Portability shims for platform‐specific system interfaces. |
|
Low‐level helpers exposing the RecordIO record format. |
|
Implementation details for |
|
Runtime configuration settings framework. |
|
Implementation details for SharedMutex; not part of the public API. |
|
SIMD algorithms and utilities. |
|
Policies that customize the behavior of folly::small_vector. |
|
SSL and TLS helpers built on OpenSSL. |
|
Implementation details for the stable radix sort. |
|
Stable LSD (Least Significant Digit) Radix Sort |
|
Stack trace capture and symbolization utilities. |
|
Testing utilities. |
|
Implementation details. |
|
There is a bug in libstdc++, libc++, and MSVC's STL that causes it to ignore unused template parameter arguments in template aliases and does not cause substitution failures. This defect has been recorded here: http://open‐std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558. |
|
Implementation namespace for the IsEqualityComparable trait. |
|
Implementation namespace for the IsLessThanComparable trait. |
Types
Name |
Description |
Tag selecting strict access mode for thread‐local storage. |
|
AccessSpreader arranges access to a striped data structure in such a way that concurrently executing threads are likely to be accessing different stripes. It does NOT guarantee uncontended access. Your underlying algorithm must be thread‐safe without spreading, this is merely an optimization. AccessSpreader::current(n) is typically much faster than a cache miss (12 nanos on my dev box, tested fast in both 2.6 and 3.2 kernels). |
|
AlignedSysAllocator |
|
AllocatorHasDefaultObjectConstruct |
|
AllocatorHasDefaultObjectDestroy |
|
AllocatorHasTrivialDeallocate |
|
A scoped lock for any capability‐annotated mutex. |
|
A |
|
Callable that invokes a function with the elements of a tuple as arguments. |
|
Arena that allocates memory in blocks and frees it all at destruction. |
|
Simple arena: allocate memory which gets freed when the arena gets destroyed. |
|
Check if two ascii characters are case insensitive equal. The difference between the lower/upper case characters are the 6‐th bit. We also check they are alpha chars, in case of xor = 32. |
|
Case‐sensitive equality comparator for ASCII characters. |
|
Generic C++ interface around Linux IO(io_submit, io_uring) |
|
An AsyncBaseOp represents a pending operation. You may set a notification callback or you may use this class's methods directly. |
|
Wrapper around AsyncBase that allows you to schedule more requests than the AsyncBase's object capacity. Other requests are queued and processed in a FIFO order. |
|
Receives the result of detaching a file descriptor from a socket. |
|
Intended for use with Unix sockets. Unlike regular |
|
|
Test fixture friendship declaration generated by the GTest macro. |
An implementation of |
|
C++ interface around Linux Async IO. |
|
A pending operation backed by the Linux io_submit interface. |
|
Creates AsyncIoUringSocket instances and reports io_uring support. |
|
An abstract LogWriter implementation that provides functionality for asynchronous IO operations. Users can subclass this class and provide their own IO operation implementation by overriding |
|
Read from a pipe in an async manner. |
|
Write to a pipe in an async manner. |
|
Interface for the read side of an asynchronous transport. |
|
A class for performing asynchronous I/O on an SSL connection. |
|
Connector that drives the SSL handshake for an AsyncSSLSocket. |
|
AsyncServerSocket is a listening socket that asynchronously informs a callback whenever a new connection has been accepted. |
|
A handler to receive notification about POSIX signals. |
|
An asynchronous socket. |
|
Base interface for asynchronous sockets bound to an event base. |
|
Exception thrown by folly asynchronous socket operations. |
|
Container of observers attached to an AsyncSocket. |
|
Observer of socket events. |
|
Abstract asynchronous transport backed by a socket. |
|
Represents a frame in an async stack trace. |
|
A stack‐root represents the context of an event loop that is running some asynchronous work. The current async operation that is being executed by the event loop (if any) is pointed to by the 'topFrame'. |
|
AsyncTimeout is used to asynchronously wait for a timeout to occur. |
|
AsyncTransport defines an asynchronous API for bidirectional streaming I/O. |
|
Generic interface applications may implement to convey self or peer certificate related information. |
|
UDP server socket |
|
UDP socket |
|
Interface for the write side of an asynchronous transport. |
|
AtFork |
|
AtForkList |
|
This class creates core‐local caches for a given shared_ptr, to mitigate contention when acquiring/releasing it. |
|
Fixed‐size, lock‐free hash array and building block for |
|
Linear probing strategy for |
|
Quadratic probing strategy for |
|
Lock‐free, growable hash map built on top of |
|
Thrown when insertion fails due to running out of space for submaps. |
|
A lock‐free intrusive single‐linked list. |
|
A very simple atomic single‐linked list primitive. |
|
A very simple atomic single‐linked list primitive. |
|
A producer‐consumer queue for passing tasks to consumer thread. |
|
An atomically‐swappable owner of a |
|
AtomicStruct<T> work like C++ atomics, but can be used on any POD type <= 8 bytes. |
|
You're probably reading this because you are looking for an AtomicUnorderedMap<K,V> that is fully general, highly concurrent (for reads, writes, and iteration), and makes no performance compromises. We haven't figured that one out yet. What you will find here is a hash table implementation that sacrifices generality so that it can give you all of the other things. |
|
Automatically times a block of code, printing a specified log message on destruction or whenever the log() method is called. For example: |
|
An exception type thrown by Expected on catastrophic logic errors, i.e., when the caller tries to access the value within an Expected but when the Expected instead contains an error. |
|
Exception thrown when a format argument string is invalid. |
|
Exception type that is thrown on invalid access of an empty |
|
Exception type that is thrown when attempting to extract from a |
|
Formatter class. |
|
Thread‐safe (atomic) token bucket implementation. |
|
A class for holding up to |
|
Specialization of BasicDynamicTokenBucket with a fixed token generation rate and a fixed maximum burst size. |
|
A Baton allows a thread to block once and be awoken. Captures a single handoff, and during its lifecycle (from construction/reset to destruction/reset) a baton must either be post()ed and wait()ed exactly once each, or not at all. |
|
Supporting type for BENCHMARK_SUSPEND defined below. |
|
Fast bit iteration facility. |
|
Wrapper class with static methods for various bit‐level operations, treating an array of T as an array of bits (in little‐endian order). (T is either an unsigned integral type or Unaligned<X>, where X is an unsigned integral type) |
|
Abstract interface for a queue that can block callers until items are available. |
|
Result of adding an item to a BlockingQueue. |
|
This class represents a bucketed time series which keeps track of values added in the recent past, and merges these values together into a fixed number of buckets to keep a lid on memory use if the number of values added is very large. |
|
A Thread pool for CPU bound tasks. |
|
Holds cache sharing topology for the current system. |
|
Derived template class that allows forwarding of a callback to be invoked in the overridden signalReceived(). |
|
Exception thrown by *Checked methods of Subprocess. |
|
A CancellationCallback object registers the callback with the specified CancellationToken such that the callback will be executed if the corresponding CancellationSource object has the requestCancellation() method called on it. |
|
A CancellationSource object provides the ability to request cancellation of operations that an associated CancellationToken was passed to. |
|
A CancellationToken is an object that can be passed into an function or operation that allows the caller to later request that the operation be cancelled. |
|
CertificateIdentityVerifier implementations are used during TLS handshakes to extract and verify end‐entity certificate identities. |
|
Base of exception hierarchy for CertificateIdentityVerifier failure reasons. |
|
Base class for structured async cleanup. |
|
CoDel (controlled delay) is an active queue management algorithm from networking for battling bufferbloat. |
|
The default configuration policy for ConcurrentBSkipList. |
|
Concurrent B‐skip‐list container; declared here for friend declarations. |
|
An atomic bitset of fixed size (specified at compile time). |
|
Implementations of high‐performance Concurrent Hashmaps that support erase and update. |
|
Thread‐safe, delayed initialization of a value computed once at first access. |
|
A concurrent, sorted, unique‐key associative container. |
|
A mixin that fires registered callbacks each time a class constructor runs. |
|
Exception thrown when a conversion fails, carrying a ConversionCode. |
|
Base class for exceptions thrown by folly conversion routines. |
|
An C++ allocator adapter for coreMalloc/Free. The allocator is stateless, to avoid increasing the footprint of the container that uses it, so the stripe needs to be passed out of band: allocate() can only be called while there is an active CoreAllocatorGuard. deallocate() can instead be called at any point. |
|
Scope guard that binds CoreAllocator allocations to a stripe. |
|
This class creates core‐local caches for a given shared_ptr, to mitigate contention when acquiring/releasing it. |
|
Core‐local cache of weak pointers to a shared object. |
|
Identification of an Intel CPU. Supports CPUID feature flags (EAX=1) and extended features (EAX=7, ECX=0). Values from http://www.intel.com/content/www/us/en/processors/processor‐identification‐cpuid‐instruction‐note.html |
|
A LogFormatter implementation that produces messages in a format specified using a config. |
|
CxxAllocatorAdaptor |
|
STL compatible huge page allocator, for use with STL‐style containers. |
|
An STL‐compatible allocator backed by the io_uring arena. |
|
Debug‐only guard that checks the context is unchanged across a scope. |
|
Interface for an object that watches an executor for deadlocks. |
|
Factory that creates DeadlockDetector instances for executors. |
|
Convenience class so that AsyncTransport can be decorated without having to redefine every single method. |
|
An alignment policy that carries a runtime alignment value. |
|
An Executor accepts units of work with add(), which should be threadsafe. |
|
DynamicBoundedQueue supports: ‐ Dynamic memory usage that grows and shrink in proportion to the number of elements in the queue. ‐ Adjustable capacity that helps throttle pathological cases of producer‐consumer imbalance that may lead to excessive memory usage. ‐ The adjustable capacity can also help prevent deadlock by allowing users to temporarily increase capacity substantially to guarantee accommodating producer requests that cannot wait. ‐ SPSC, SPMC, MPSC, MPMC variants. ‐ Blocking and spinning‐only variants. ‐ Inter‐operable non‐waiting, timed until, timed for, and waiting variants of producer and consumer operations. ‐ Optional variable element weights. |
|
DelayedDestruction is a helper class to ensure objects are not deleted while they still have functions executing in a higher stack frame. |
|
DelayedDestructionBase is a helper class to ensure objects are not deleted while they still have functions executing in a higher stack frame. |
|
DelayedInit ‐‐ thread‐safe delayed initialization of a value. There are two important differences between Lazy and DelayedInit: 1. DelayedInit does not store the factory function inline. 2. DelayedInit is thread‐safe. |
|
Node traits for types that derive from IntrusiveHeapNode. |
|
DestructorCheck is a helper class that helps to detect if a tracked object was deleted. This is useful for objects that request callbacks from other components. |
|
Stat digests, such as TDigest, can be expensive to merge. It is faster to buffer writes and merge them in larger chunks. DigestBuilder buffers writes to improve performance. |
|
Discriminated pointer. |
|
An executor that can be driven forward via its |
|
A bounded, FIFO, multi‐producer multi‐consumer queue with adjustable capacity and dynamic memory usage. |
|
Each specialization of DynamicConstructor has the function 'static dynamic construct(const C&);' |
|
Each specialization of DynamicConverter has the function 'static T convert(const dynamic&);' |
|
A small DSL for losslessly parsing a folly::dynamic into another representation while recording any parts that cause errors. |
|
When DynamicParser is used incorrectly, it will throw this exception instead of reporting an error via releaseErrors(). It is unsafe to call any parser methods after catching a LogicError. |
|
With DynamicParser::OnError::THROW, reports the first error. It is forbidden to call releaseErrors() if you catch this. |
|
A ring buffer queue backed by a power‐of‐two sized array that grows on overflow. Not thread‐safe. |
|
DEPRECATED: use |
|
Identification of hardware capabilities via the ELF auxiliary vector. |
|
EnablePrimaryFromThis provides an object with appropriate access to the functionality of the PrimaryPtr holding this. |
|
Converts integral and floating point values between native, big‐endian, and little‐endian byte orders. |
|
An event loop that drives asynchronous I/O and timers. |
|
Lock‐free notification queue of tasks consumed by a single consumer. |
|
Abstract base for the backend that drives an EventBase loop. |
|
Wrapper around a libevent event owned by an EventBase backend. |
|
Storage for data tied to the lifetime of an EventBase. |
|
Manager for per‐thread EventBase objects. This class will find or create a EventBase for the current thread, associated with thread‐specific storage for that thread. Although a typical application will generally only have one EventBaseManager, there is no restriction on multiple instances; the EventBases belong to one instance are isolated from those of another. |
|
Observer interface that samples EventBase loop activity. |
|
Owns an EventBase running on its own thread. |
|
A Timekeeper that schedules timeouts on an externally supplied EventBase. |
|
Event count: a condition variable for lock free algorithms. |
|
The EventHandler class is used to asynchronously wait for events on a file descriptor. |
|
low‐level libevent utility functions |
|
A general purpose LRU evicting cache designed to support constant time set/get/insert/erase ops. The only required configuration parameter is the |
|
Observes the execution of a task. Multiple execution observers can be chained together. As a caveat, execution observers should not remove themselves from the list of observers during execution |
|
Notifies a list of execution observers around a scoped task execution. |
|
Schedules and runs asynchronous work. |
|
Records whether blocking is forbidden while an executor is running work. |
|
Scoped guard that pushes an executor blocking context for its lifetime. |
|
A node in the thread‐local stack of executor blocking contexts. |
|
|
|
Wraps an executor so that submitted tasks run at a chosen priority. |
|
Forward declarations |
|
F14 hash map that selects a value or vector layout based on entry size. |
|
F14 hash set that selects a value or vector layout based on element size. |
|
An opaque token holding the precomputed hash of a key. |
|
A key paired with its precomputed F14 hash token for faster lookups. |
|
F14 hash map that stores each entry in a separately allocated node. |
|
F14 hash set that stores each element in a separately allocated node. |
|
Diagnostic statistics describing the internal state of an F14 table. |
|
F14 hash map that stores entries inline in the main array. |
|
F14 hash set that stores elements inline in the main array. |
|
Test‐only accessor granting inspection of F14ValueSet internals. |
|
F14 hash map that keeps entries in a dense, index‐addressable vector. |
|
F14 hash set that keeps elements in a dense, index‐addressable vector. |
|
A class that lazily binds a unique (for each implementation of Atom) identifier to a thread. This is a fallback mechanism for the access spreader if __vdso_getcpu can't be loaded |
|
An IOExecutor that executes funcs under mapped fiber context |
|
A File represents an open file. |
|
FileHandlerFactory is a LogHandlerFactory that constructs log handlers that write to a file. |
|
A helper class for creating an AsyncFileWriter or ImmediateFileWriter based on log handler options settings. |
|
Compute the Rabin fingerprint. |
|
An alignment policy that carries a compile‐time alignment value. |
|
A simple fixed‐capacity ring buffer queue backed by a power‐of‐two sized array. Not thread‐safe. |
|
‐ A simple interface that requires minimal extra code by the user. To use this interface efficiently the user‐provided functions must be copyable to folly::Function without dynamic allocation. If this is impossible or inconvenient, the user is encouraged to use the custom interface described below. ‐ A custom interface that supports custom combining and custom request structure, either for the sake of smart combining or for efficiently supporting operations that are not be copyable to folly::Function without dynamic allocation. ‐ Both synchronous and asynchronous operations. ‐ Request records with and without thread‐caching. ‐ Combining with and without a dedicated combiner thread. |
|
Thread‐safe priority queue based on flat combining. If the constructor parameter maxSize is greater than 0 (default = 0), then the queue is bounded. This template provides blocking, non‐blocking, and timed variants of each of push(), pop(), and peek() operations. The empty() and size() functions are inherently non‐blocking. |
|
Parsed format argument. |
|
Exception class thrown when a format key is not found in the given associative container keyed by strings. We inherit std::out_of_range for compatibility with callers that expect exception to be thrown directly by std::map or std::unordered_map. |
|
Customization point for formatting a value of type |
|
Binds a format string to its arguments for deferred formatting. |
|
A polymorphic, move‐only wrapper for any callable of a given signature. |
|
A reference wrapper for callable objects |
|
Schedules any number of functions to run at various intervals. E.g., |
|
Executor wrapper that adds future‐returning task submission. |
|
FutureSplitter provides a `getFuture()' method which can be called multiple times, returning a new Future each time. These futures are completed when the original Future passed to the FutureSplitter constructor is completed, and are completed on the same executor (if any) and at the same priority as the original Future. Calls to `getFuture()' after that time return a completed Future. |
|
Exception thrown when a FutureSplitter holds no Future. |
|
A concurrent, bounded, approximately‐LRU cache with lock‐free lookups. |
|
Interface for executors that provide a WorkerProvider to collect thread ids. |
|
Knows how to derive a function pointer to the VDSO implementation of getcpu(2), if available |
|
Load counters for the global immutable CPU executor. |
|
A LogFormatter implementation that produces messages in a format similar to that produced by the Google logging library. |
|
The default |
|
Group varint encoder/decoder for 32‐ or 64‐bit integers. |
|
Simplify use of GroupVarint* for the case where the last group in the input may be incomplete (but the exact size of the input is known). Allows for extracting values one at a time. |
|
Simplify use of GroupVarint* for the case where data is available one entry at a time (instead of one group at a time). Handles buffering and an incomplete last chunk. |
|
Hashed Hierarchical Wheel Timer |
|
Generic variadic hasher that dispatches to folly::hasher for each argument. |
|
Assigns thread ids by hashing the platform thread identifier. |
|
A lock‐free LIFO stack that reclaims popped nodes with hazard pointers. |
|
Set implemented as an ordered singly‐linked list. |
|
Wide CAS. |
|
A Timekeeper with a dedicated thread that manages the timeouts using a heap. Timeouts can be scheduled with microsecond resolution, though in practice the accuracy depends on the OS scheduler's ability to wake up the worker thread in a timely fashion. |
|
Equality comparator that enables heterogeneous lookup for key type |
|
Hasher that enables heterogeneous lookup for key type |
|
Trait that is true when two hashers agree on prehash values. |
|
A basic histogram class. |
|
A supported huge page size and its mount point. |
|
IOBuf manages heap‐allocated byte buffers. |
|
Ordering for IOBuf objects. Compares data in the entire chain. |
|
Equality predicate for IOBuf objects. Compares data in the entire chain. |
|
Greater predicate for IOBuf objects. Compares data in the entire chain. |
|
At‐least predicate for IOBuf objects. Compares data in the entire chain. |
|
Hasher for IOBuf objects. Hashes the entire chain using SpookyHashV2. |
|
IOBufIovecBuilder exists to help allocate and fill IOBuf chains using iovec‐based scatter/gather APIs. |
|
Less predicate for IOBuf objects. Compares data in the entire chain. |
|
At‐most predicate for IOBuf objects. Compares data in the entire chain. |
|
Inequality predicate for IOBuf objects. Compares data in the entire chain. |
|
An IOBufQueue encapsulates a chain of IOBufs and provides convenience functions to append data to the back of the chain and remove data from the front. |
|
An executor backed by an I/O event loop. |
|
Caches objects of type T that are bound to an EventBase from the global IOExecutor. |
|
Observer that attaches a deadlock detector to each event base of an IO thread pool. |
|
A Thread Pool for IO bound tasks |
|
Base interface for executors that run tasks on IO threads with EventBases. |
|
A representation of an IP address (IPv4 or IPv6). |
|
Exception that is thrown when dealing with invalid IP addresses. A subclass of |
|
A representation of an IPv4 address. |
|
A representation of an IPv6 address. |
|
A type that is implicitly constructible from and assignable by anything. |
|
A LogWriter implementation that immediately writes to a file descriptor when it is invoked. |
|
ImmutableRequestData is a folly::RequestData that holds an immutable value. It is thread‐safe (a requirement of RequestData) because it is immutable. |
|
|
Deprecated subclass of Synchronized that provides implicit locking via operator‐>. This is intended to ease migration while preventing accidental use of operator‐> in new code. |
A variant of EvictingCacheMap that assigns weights to entries and evicts entries in LRU order to ensure the total weight of all entries stays below some set maximum. ImplicitlyWeighted means this variant derives the weights from the key‐values using a chosen function. TWeightFn must be a type implementing |
|
Wraps an inline object that is never destructed, for Meyers singletons. |
|
Instances of IndexedMemPool dynamically allocate and then pool their element type (T), returning 4‐byte integer indices that can be passed to the pool's operator[]method to access or obtain pointers to the actual elements. The memory backing items returned from the pool will always be readable, even if items have been returned to the pool. These two features are useful for lock‐free algorithms. The indexing behavior makes it easy to build tagged pointer‐like‐things, since a large number of elements can be managed using fewer bits than a full pointer. The access‐after‐free behavior makes it safe to read from T‐s even after they have been recycled, since it is guaranteed that the memory won't have been returned to the OS and unmapped (the algorithm must still use a mechanism to validate that the read was correct, but it doesn't have to worry about page faults), and if the elements use internal sequence numbers it can be guaranteed that there won't be an ABA match due to the element being overwritten with a different type that has the same bit pattern. |
|
A Traits type that controls the object lifecycle strategy of an IndexedMemPool. |
|
RAII object constructed at the beginning of main() and destructed implicitly at the end of main(). |
|
Options controlling folly initialization. |
|
A thread factory that runs setup and teardown callbacks around each thread. |
|
When work is "queued", execute it immediately inline. Usually when you think you want this, you actually want a QueuedImmediateExecutor. |
|
Base class for executors that run queued work inline. |
|
IntrusiveHeap implements a skew heap with intrusive pointers to provide O(log(n)) operations on any node in the heap with no separately allocated node type. |
|
Base class for items to be inserted into IntrusiveHeap<..., Tag> storing pointers for internal use. |
|
Test fixture granted access to node internals. |
|
Exception that is thrown when an IP Address is not of the family expected (ie, expected a V4 but is a V6). A subclass of IPAddressFormatException. |
|
Base class for an io_uring submission queue entry managed by Folly. |
|
A memory arena registered with the kernel for io_uring operations. |
|
The io_uring‐based EventBase backend. |
|
Receives notifications about the outcome of an io_uring connect operation. |
|
Performs an asynchronous connect over an io_uring‐backed socket. |
|
Tracks a file descriptor registered with an io_uring ring. |
|
A pending operation backed by the Linux io_uring interface. |
|
Receives notifications about the progress of an io_uring receive operation. |
|
Manages inbound receives over an io_uring‐backed socket. |
|
Receives notifications about the progress of an io_uring send operation. |
|
Manages a single outbound send over an io_uring‐backed socket. |
|
Trait: true when hasher Hasher avalanches input entropy across every bit of the hash of key Key. |
|
Trait detecting whether a type can be a split() output field. |
|
A trait describing whether a value of type T can be relocated with memcpy. |
|
Trait that identifies string‐like types such as |
|
A trait describing whether value‐initialization equals zero‐filling memory. |
|
An allocator which uses Jemalloc to create a dedicated huge page arena, backed by 2MB huge pages (on linux x86‐64). |
|
An allocator which uses Jemalloc to create an dedicated arena to allocate memory from. The only special property set on the allocated memory is that the memory is not dump‐able. |
|
Similar to AccessSpreader, but it has exactly one stripe for each last‐level cache that is accessible by the current process. |
|
Example: |
|
A singleton whose instance is intentionally never destroyed. |
|
A helper clock type to helper older code using BucketedTimeSeries with std::chrono::seconds transition to properly using clock types and time_point objects. |
|
Concrete LIFO semaphore parameterized by its baton and atomic types. |
|
A blocking multi‐producer, multi‐consumer queue backed by a LIFO semaphore. |
|
LockFreeRingBuffer<T> is a fixed‐size, concurrent ring buffer with the following semantics: |
|
A LockedPtr keeps a Synchronized<T> object locked for the duration of LockedPtr's existence. |
|
Base class that owns the lock held by a |
|
LogCategory stores all of the logging configuration for a specific log category. |
|
Configuration for a LogCategory |
|
Configuration describing log categories and handlers. |
|
Exception thrown when a log configuration string cannot be parsed. |
|
LogFormatter defines the interface for serializing a LogMessage object into a buffer to be given to a LogWriter. |
|
Consumes and processes log messages. |
|
Configuration for a LogHandler |
|
Interface for factories that construct log handlers from config options. |
|
LogMessage represents a single message to be logged. |
|
The LogName class contains utility functions for processing log category names. It primarily handles canonicalization of names. |
|
A std::ostream implementation for use by the logging macros. |
|
A std::streambuf implementation for use by LogStream |
|
LogStreamProcessor receives a LogStream and logs it. |
|
LogStreamVoidify() is a helper class used in the FB_LOG() and XLOG() macros. |
|
Writes serialized log messages to an output. |
|
Logger is the class you will use to specify the log category when logging messages with FB_LOG(). |
|
LoggerDB stores the set of LogCategory objects. |
|
A multi‐producer, multi‐consumer pipeline of processing stages. |
|
Describes a pipeline stage carrying element type T with amplification Amp. |
|
MPMCQueue<T> is a high‐performance bounded concurrent queue that supports multiple producers, multiple consumers, and optional blocking. The queue has a fixed capacity, for which all memory will be allocated up front. The bulk of the work of enqueuing and dequeuing can be performed in parallel. |
|
A 48‐bit ethernet MAC address. |
|
Caches the resolved MIB for a |
|
Caches the resolved MIB for a |
|
Caches the resolved MIB for a |
|
Caches the resolved MIB for a |
|
A ManualExecutor only does work when you turn the crank, by calling run() or indirectly with makeProgress() or waitFor(). |
|
Manually controlled Timekeeper for unit testing. |
|
MaybeManagedPtr stores either a raw pointer or a shared_ptr. It provides normal pointer operations on the underlying raw pointer/shared_ptr. |
|
Node traits for types that hold an IntrusiveHeapNode member. |
|
Maps files in memory (read‐only). |
|
A tiny one‐byte spinlock with a configurable spin and yield budget. |
|
Base class holding the lock byte and the bit‐packing helpers shared by every MicroLock specialization. |
|
A really, really small spinlock for fine‐grained locking of lots of teeny‐tiny data. |
|
C++11 closures don't support move‐in capture. Nor does std::bind. facepalm. |
|
This class represents a timeseries which keeps several levels of data granularity (similar in principle to the loads reported by the UNIX 'uptime' command). It uses several instances (one per level) of BucketedTimeSeries as the underlying storage. |
|
Equivalent to (but more efficient than) a SimpleQuantileEstimator plus one SlidingWindowQuantileEstimator for each requested window. |
|
MutableAtom is a tiny wrapper that gives you the option of atomically updating values inserted into an AtomicUnorderedInsertMap<K, MutableAtom<V>>. This relies on AtomicUnorderedInsertMap's guarantee that it doesn't move values. |
|
MutableData is a tiny wrapper that gives you the option of using an external concurrency control mechanism to updating values inserted into an AtomicUnorderedInsertMap. |
|
NOTE: This is highly experimental. Do not use. |
|
A ThreadFactory that names each thread it creates. |
|
A thin wrapper over the platform's native counting semaphore. |
|
App that uses a nested command line, of the form: |
|
Result of parsing a nested command line. |
|
NetworkSocket is just a very thin wrapper around either a file descriptor or a SOCKET depending on platform, along with a couple of helper methods for explicitly converting to/from file descriptors, even on Windows. |
|
Tag type used to construct an empty Optional, akin to std::nullopt_t. |
|
Queue used to deliver messages to an EventBase thread. |
|
Policy‐based implementation of ObserverContainerBase. |
|
Base ObserverContainer and definition of Observers. |
|
Policy for ObserverContainerBase. |
|
Policy‐based implementation of ObserverContainerStoreBase. |
|
Interface for store of pointers to observers. |
|
Policy for ObserverContainerStore. |
|
Handler for OpenSSL session tickets. |
|
Generic interface applications may implement to convey self or peer certificate related information. |
|
IMPORTANT: |
|
Optional is superseded by std::optional. Now that the C++ has a standardized implementation, Optional exists primarily for backward compatibility. |
|
Exception thrown when unwrapping the value of an empty Optional. |
|
An 8‐byte pointer with an integrated spin lock and 15‐bit integer. |
|
A portable, futex‐like waiter registry keyed by address. |
|
Password collector that reads a passphrase from a file on construction. |
|
Spin lock on a single bit in an integral type. You can use this with 16, 32, or 64‐bit integral types. |
|
|
|
Used in the definition of a |
|
A list of member pointers describing a |
|
Helper that computes the self type of a |
|
Predefined sets of quantiles for use with QuantileHistogram. |
|
PrimaryPtr should be used to achieve deterministic destruction of objects with shared ownership. Once an object is managed by a PrimaryPtr, shared_ptrs can be obtained pointing to that object. However destroying those shared_ptrs will never call the object destructor inline. To destroy the object, join() method must be called on PrimaryPtr or the task returned from cleanup() must be completed, which will wait for all shared_ptrs to be released and then call the object destructor on the caller supplied execution context. |
|
PrimaryPtrRef is a non‐owning reference to the pointer. PrimaryPtr::join() and the PrimaryPtr::cleanup() work do NOT wait for outstanding PrimaryPtrRef objects to be released. |
|
A blocking queue with priority levels backed by per‐priority MPMC queues and a LIFO semaphore. |
|
A ThreadFactory that sets nice values for each thread. The main use case for this class is if there are multiple CPUThreadPoolExecutors in a single process, or between multiple processes, where some should have a higher priority than the others. |
|
A blocking queue with a fixed number of priority levels. |
|
PriorityUnboundedQueueSet |
|
Class to wrap a process return code. |
|
A single‐producer, single‐consumer, lock‐free bounded queue. |
|
Exception that commands may throw to force the program to exit cleanly with a given exit code. NestedCommandLineApp::run() catches this and makes run() print the given message on stderr (followed by a newline, unless empty; the message is only allowed when exiting with a non‐zero status), and return the exit code. (Other exceptions will propagate out of run()) |
|
Summary statistics and quantile estimates produced by a QuantileEstimator. |
|
|
A histogram that tracks the locations of a fixed set of quantiles. |
Exception thrown when adding to a full queue that uses THROW behavior. |
|
Aggregates the worker thread ids per queue name along with their keep‐alives. |
|
Observes enqueue and dequeue events on a queue. |
|
Factory that creates QueueObserver instances for a queue. |
|
Runs inline like InlineExecutor, but with a queue so that any tasks added to this executor by one of its own callbacks will be queued instead of executed inline (nested). This is usually better behavior than Inline. |
|
A simple, small (4‐bytes), but unfair rwlock. Use it when you want a nice writer and don't expect a lot of write/read contention, or when you need small rwlocks since you are creating a large number of them. |
|
Provides static random number generation utilities. |
|
A lightweight, non‐owning view over a range of elements. |
|
Owning pointer that gives cheap, lock‐free reads to shared objects. |
|
This can be used to destroy multiple ReadMostlyMainPtrs at once. |
|
Shared reader handle to a read‐mostly managed object. |
|
Non‐owning weak reference to a read‐mostly managed object. |
|
Class to read from a RecordIO file. Will skip invalid records. |
|
Class to write a stream of RecordIO records to a file. |
|
RegexMatchCache |
|
RegexMatchCacheDynamicBitset |
|
RegexMatchCacheIndexedVector |
|
RegexMatchCacheKey |
|
RegexMatchCacheKeyAndView |
|
A fast, scalable, relaxed concurrent priority queue. |
|
Wraps a |
|
Per‐request context associated with an enqueued item. |
|
RequestContextSaverScopeGuard allows to replace the current context without switching back to original context, while ensuring that the original context is restored on guard destruction. |
|
Note: you probably want to use ShallowCopyRequestContextScopeGuard This resets all other RequestData for the duration of the scope! |
|
Base class for data that follows an async request through a process. |
|
Sets and retrieves the EventBase associated with a request via RequestContext. |
|
A token used to fetch data from a RequestContext. |
|
Run SSL_accept via a runner |
|
Wrap OpenSSL SSL_CTX into a class. |
|
Exception describing an SSL error and its underlying OpenSSL code. |
|
A TimeoutManager backed by a TimerFD that tracks a single timeout. |
|
SaturatingSemaphore is a flag that allows concurrent posting by multiple posters and concurrent non‐destructive waiting by multiple waiters. |
|
An executor that supports timed scheduling. Like RxScheduler. |
|
Helper that runs an EventBase loop on a dedicated std::thread. |
|
This class temporarily unlocks a LockedPtr in a scoped manner. |
|
An executor that sequences tasks whose submissions were sequenced. |
|
Assigns thread ids from a monotonically increasing counter. |
|
A sequenced executor that never runs its tasks concurrently. |
|
This guard maintains all the RequestData pointers of the parent. This allows to overwrite a specific RequestData pointer for the scope's duration, without breaking others. |
|
A small, fast, scalable reader‐writer lock. |
|
Default tuning and feature policy for SharedMutexImpl. |
|
Records where a shared lock was recorded so it can be released quickly. |
|
SharedPromise provides the same interface as Promise, but you can extract multiple Futures from it, i.e. you can call getFuture() as many times as you'd like. When the SharedPromise is fulfilled, all of the Futures are completed. Calls to getFuture() after the SharedPromise is fulfilled return a completed Future. If you find yourself constructing collections of Promises and fulfilling them simultaneously with the same value, consider this utility instead. Likewise, if you find yourself in need of setting multiple callbacks on the same Future (which is indefinitely unsupported), consider refactoring to use SharedPromise to "split" the Future. |
|
The exception thrown when wait()ing on an isShutdown() LifoSem |
|
Set of sockets that allows immediate, take‐no‐prisoners abort. |
|
SimpleAsyncIO is a wrapper around AsyncIO intended to hide all the details. |
|
A QuantileEstimator that buffers writes for 1 second. |
|
SingleWriterFixedHashMap: |
|
Singleton allows for simple access to registering and instantiating singletons. Create instances of this class in the global scope of type Singleton<T> to register your singleton for later access via Singleton<T>::try_get(). |
|
A CRTP base class that keeps a global count of instances of a type. |
|
Provides access to the running instance count of a countable type. |
|
A singleton‐per‐tag relaxed counter. |
|
SingletonThreadLocal |
|
SingletonVault ‐ a library to manage the creation and destruction of interdependent singletons. |
|
A QuantileEstimator that keeps values for nWindows * windowDuration (see constructor). Values are buffered for windowDuration. |
|
Provides a unified interface for socket addresses. |
|
Represents an ordered collection of file descriptors. This union type either contains: ‐ FDs to be sent on a socket ‐‐ with shared ownership, since the sender may still need them, OR ‐ FDs just received, with sole ownership. |
|
Uniquely identifies a handle to a socket option value. Each combination of level and option name corresponds to one socket option value. |
|
Variant container for socket option values: integer or string. Implicit ctor/compares with int for backward compatibility. |
|
Executor that performs priority‐based scheduling with a deadline assigned to each task. |
|
* SparseByteSet |
|
A small, non‐recursive spin lock with a standard lock interface. |
|
Array of spinlocks where each one is padded to prevent false sharing. Useful for shard‐based locking implementations in environments where contention is unlikely. |
|
SplitOptions |
|
StandardLogHandler is a LogHandler implementation that uses a LogFormatter class to serialize the LogMessage into a string, and then gives it to a LogWriter object. |
|
StandardLogHandlerFactory contains helper methods for LogHandlerFactory implementations that create StandardLogHandler objects. |
|
A template for defining ODR‐usable constexpr instances, free of ODR and init‐order problems. |
|
Shared serialising queue used by StrandExecutors to run at most one task at a time. |
|
Executor that serialises work while delegating execution to a parent executor, sharing a StrandContext to serialise across executors. |
|
StreamHandlerFactory is a LogHandlerFactory that constructs log handlers that write to stdout or stderr. |
|
Robust and efficient online computation of statistics, using Welford's method for variance. https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm |
|
A logical conjunction of traits that evaluates all sub‐conditions eagerly. |
|
A logical disjunction of traits that evaluates all sub‐conditions eagerly. |
|
An approximate implementation of an Earliest Deadline First executor. |
|
A BlockingQueue sharded by LLC cache. Compared to the default PriorityUnboundedBlockingQueue, this can reduce contention on systems with a large number of LLC caches, at the cost of unfairness and work conservation; see the StripedThrottledLifoSem documentation for a detailed explanation. |
|
A striped version of ThrottledLifoSem. |
|
Background balancer that periodically corrects stripe imbalances. |
|
Subprocess. |
|
Base exception thrown by the Subprocess methods. |
|
Exception thrown if the subprocess cannot be started. |
|
Error type for trySplitTo(), below. |
|
|
|
SynchronizedBase is a helper parent class for Synchronized<T>. |
|
A |
|
Holds a lock together with access to the element it protects. |
|
SysAllocator |
|
Arena that uses the system allocator (malloc / free) |
|
Deleter that releases memory with |
|
TDigests are a biased quantile estimator designed to estimate the values of the quantiles of streaming data with high accuracy and low memory, particularly for quantiles at the tails (p0.1, p1, p99, p99.9). See https://github.com/tdunning/t‐digest/blob/master/docs/t‐digest‐paper/histo.pdf for an explanation of what the purpose of TDigests is, and how they work. |
|
A reference counter that keeps per‐thread counts to avoid contention. |
|
Abstraction layer for capturing current TCP and congestion control state. |
|
Dispatcher that enables calls to TcpInfo to be intercepted for tests. |
|
Container for folly::TcpInfoDispatcher. |
|
Thread‐caching arena: allocate memory which gets freed when the arena gets destroyed. |
|
A thread‐safe counter that caches increments in thread‐local storage. |
|
Interface for creating threads used by executors. |
|
WorkerProvider backed by an explicitly maintained set of thread ids. |
|
Thread‐local storage for a value of type |
|
A PRNG with one instance per thread. This PRNG uses a mersenne twister random number generator and is seeded from /dev/urandom. It should not be used for anything which requires security, only for statistical randomness. |
|
Thread‐local owning pointer to a value of type |
|
Base class for implementing threadpool based executors. |
|
A hook for tracking which threads belong to which thread pools. This is used only by a gdb extension to aid in debugging. You won't be able to see any useful information from within C++ code. |
|
The default Timekeeper implementation which uses a HHWheelTimer on an EventBase in a dedicated thread. Users needn't deal with this directly, it is used by default by Future methods that work with timeouts. |
|
* ThreadedExecutor |
|
For each function |
|
ThrottledLifoSem is a semaphore that can wait up to a configurable wakeUpInterval before waking up a sleeping waiter. This gives an opportunity to new waiters to consume the posted values, avoiding the overhead of waking up a thread when the already active threads can consume values fast enough, effectively allowing to batch the work. The semaphore is "throttled" because sleeping waiters can be awoken at most once every wakeUpInterval. |
|
A DrivableExecutor can be driven via its drive() method or its driveUntil() that drives until some time point. |
|
This class turns a Executor into a ScheduledExecutor. |
|
Exception thrown when no timekeeper is available for scheduling. |
|
Base interface to be implemented by all classes expecting to manage timeouts. AsyncTimeout will use implementations of this interface to schedule/cancel timeouts. |
|
A queue of scheduled timeout events keyed by expiration time. |
|
Manages many timeouts on a single TimerFD. |
|
TimeseriesHistogram tracks data distributions as they change over time. |
|
Default policy for the token bucket templates, selecting the alignment, atomic type, clock, and concurrency behavior. |
|
Thread‐safe (atomic) token bucket primitive. |
|
Equality comparator for strings of |
|
Hasher for strings of |
|
A wrapper that contains either an instance of |
|
Exception type thrown by |
|
Recursively hashes tuple elements, combining them into a single hash. |
|
Exception thrown when a dynamic is accessed as the wrong type. |
|
Wrapper class to handle a IOBuf as a typed buffer (to a standard layout class). |
|
A view over a UTF‐8 string that iterates it as UTF‐32 code points. |
|
Representation of an unaligned value of a POD type. |
|
An Unaligned<T> variant whose loads and stores can have address sanitizer disabled on demand. |
|
A blocking queue with unbounded capacity. |
|
UnboundedQueue supports a variety of options for unbounded dynamically expanding an shrinking queues, including variations of: ‐ Single vs. multiple producers ‐ Single vs. multiple consumers ‐ Blocking vs. spin‐waiting ‐ Non‐waiting, timed, and waiting consumer operations. Producer operations never wait or fail (unless out‐of‐memory). |
|
Unexpected ‐ a helper type used to disambiguate the construction of Expected objects in the error state. |
|
In functional programming, the degenerate case is often called "unit". In C++, "void" is often the best analogue. However, because of the syntactic special‐casing required for void, it is frequently a liability for template metaprogramming. So, instead of writing specializations to handle cases like SomeContainer<void>, a library author may instead rule that out and simply have library users use SomeContainer<Unit>. Contained values may be ignored. Much easier. |
|
Class representing a URI. |
|
A single user‐defined benchmark metric holding a value and its kind. |
|
Exception thrown when an uninitialized |
|
Light‐weight view onto an existing EventBase. |
|
VirtualExecutor implements a light‐weight view onto existing Executor. |
|
Callback object for |
|
WaitOptions |
|
A variant of EvictingCacheMap that tracks weights for entries and evicts entries in LRU order to ensure the total weight of all entries stays below some set maximum. Weights are stored as a size_t with each entry. |
|
WorkerProvider is a simple interface that can be used to collect information about worker threads that are pulling work from a given queue. |
|
Wrapper class for WriteCallback that includes a boolean variable to track whether the write has already started or not |
|
Helper class that redirects write() and writev() calls to writeChain(). |
|
Options controlling the behavior of writeFileAtomic(). |
|
Per‐XLOG()‐statement storage for the resolved log category. |
|
File‐scope cache of the log level and category shared by a |
|
A file‐static XlogLevelInfo and XlogCategoryInfo object is declared for each XLOG() statement. |
|
Tag type indicating that a lock transition should adopt existing lock state. |
|
A wrapper that stores a value of type T with at least the given alignment. |
|
allocator_delete |
|
|
Scoped guard that suppresses ThreadSanitizer reports within its lifetime. |
For cases when multiple badge holders need to call a function we can use folly::any_badge over each individual holder allowed. We allow subsets of badges to lift into supersets: folly::any_badge[ lifts into folly::any_badge[.]] |
|
Traits providing the asymmetric fence callables for an atomic template. |
|
atomic_grow_array |
|
|
atomic_grow_array_policy_default |
A reference wrapper offering atomic operations on a non‐atomic object. |
|
Atomic wrapper around std::shared_ptr providing lock‐free style operations. |
|
Trait giving the thread‐fence function for an atomic template. |
|
Trait giving the effective value type of an atomic‐like type. |
|
Badge pattern allows us to abstract over friend classes and make friend feature more scoped. Using this simple technique we can specify a badge tag on specific functions we want to gate for particular caller contexts (badge holders). Badge can only be constructed by the specified badge holder binding the tagged functions to that call site. |
|
Exception thrown when base64 decoding fails. |
|
Result of a low‐level base64 decode operation. |
|
cstring_view |
|
This is the basic_string replacement. For conformity, basic_fbstring takes the same template parameters, plus the last one which is the core. |
|
The flag template to be used with call_once. Parameterizable by the mutex type and atomic template. The mutex type is required to mimic std::mutex and the atomic type is required to mimic std::atomic. |
|
A container for C arrays, for returning non‐zero‐sized C arrays from constexpr functions. |
|
An empty type aligned to cacheline_align_v. |
|
Exception thrown by the simple cli_apply_args_files overload. |
|
Options controlling args‐file expansion. |
|
Callback interface receiving events while expanding args‐files. |
|
Start with the user docs in |
|
An alternative flag that can be used with call_once that uses only 1 byte. Uses a 3‐state std::atomic<uint8_t> with wait/notify for synchronization. |
|
Comparison predicate that is true when the underlying comparator |
|
Comparison predicate that is true when the underlying comparator |
|
Comparison predicate that is true when the underlying comparator |
|
Comparison predicate that is true when the underlying comparator |
|
Comparison predicate that is true when the underlying comparator |
|
Comparison predicate that is true when the underlying comparator |
|
/////////////////////////////////////////////////////////////////// |
|
constexpr_iterated_squares_desc |
|
Calculates the duration of time intervals. Prefer this over directly using monotonic clocks. It is very lightweight and provides convenient facilities to avoid common pitfalls. |
|
Default policy handling null‐pointer violations for not_null. |
|
Maps a type to itself, and maps Unit back to |
|
Dummy fbstring core that uses an actual std::string. This doesn't make any sense ‐ it's just for testing purposes. |
|
Forward declaration of folly::dynamic used for serializing results. |
|
A mutable view of a dynamic that can extract values without copying. |
|
Argument tuple for variadic emplace/constructor calls. Stores arguments by (decayed) value. Restores original argument types with reference qualifiers and adornments at unpack time to emulate perfect forwarding. |
|
Empty‐`Try` policy type that maps the empty state to an error |
|
Empty‐`Try` policy that produces a |
|
Holds an error ( |
|
An immutable refcounted string suitable for use in an exception. |
|
Throwing exceptions can be a convenient way to handle errors. Storing exceptions in an |
|
Tag type selecting the factory constructor of |
|
This is the core of the string. The code should work on 32‐ and 64‐bit and both big‐ and little‐endian architectures with any Char size. |
|
Forward declaration of the fbvector container. |
|
floating_point_integral_constant |
|
|
fmt_vformat_mangle_format_string_fn fmt_vformat_mangle_format_string |
|
Callable that invokes a function for each named argument in a format string. |
Transports the cvref‐qualifications of |
|
Yields the function type |
|
Discovers every fact of a function type |
|
get_exception_tag_t |
|
Retrieves the rich error code associated with an error. |
|
Base that grants trusted subclasses a token to bypass null checks. |
|
hash_counter_engine |
|
Primary template for folly's per‐type hasher; specialized for supported key types. |
|
hazptr_array |
|
hazptr_deleter |
|
hazptr_domain |
|
hazptr_holder |
|
Grants hazptr_local access to the thread cache internals. |
|
hazptr_obj |
|
hazptr_obj_base |
|
hazptr_obj_base_linked |
|
hazptr_obj_cohort |
|
hazptr_obj_linked |
|
hazptr_obj_list |
|
hazptr_obj_retired_list |
|
hazptr_rec |
|
hazptr_root |
|
hazptr_tc: |
|
hazptr_tc_entry |
|
Tag type identifying the hazard pointer thread cache's thread‐local singleton. |
|
A heap_vector_map based on heap layout. |
|
heap_vector_set is a specialization of heap_vector_container |
|
A lock‐holder type which holds shared locks for shared mutex types or exclusive locks otherwise. |
|
A lock‐holder base which holds shared locks for shared mutex types or exclusive locks otherwise. |
|
For shared mutex types, effectively |
|
A rich error whose storage has static (immortal) lifetime. |
|
index_iterator |
|
indirect |
|
inheriting_coded_rich_error |
|
Initializer lists are a powerful compile time syntax introduced in C++11 but due to their often conflicting syntax they are not used by APIs for construction. |
|
Composite invoker delegating to the first invoker matching the call. |
|
Wraps a callable made via |
|
Traits container mimicking the C++17 invocation traits for invoker |
|
Trait that detects whether a type is a |
|
A trait type to test whether a type is an allocator. |
|
A trait type that is true when T is an arithmetic type. |
|
A type to check if a given type is a bounded array. |
|
is_complete is_complete_v |
|
A type which determines whether the type parameter is constexpr default‐constructible. |
|
A trait type to test whether a metafunction succeeds in substitution. |
|
Trait that reports whether T is an instantiation of heap_vector_map. |
|
Trait that reports whether T is an instantiation of heap_vector_set. |
|
A type to check if a given type is an instantiation of a class template. |
|
A trait type that is true when T is an integral type. |
|
Trait testing whether |
|
Trait testing whether the result of invoking |
|
A trait type that is true when Int is integral but not bool. |
|
Trait testing whether |
|
Trait testing the nothrow invocation of |
|
Trait testing whether the |
|
Type trait to test if a type is a |
|
A trait type that is true when T is a signed type. |
|
Trait that detects a small_sorted_vector_map specialization. |
|
Trait that detects a small_sorted_vector_set specialization. |
|
Trait that detects whether a type is a folly::small_vector. |
|
Trait that detects a sorted_vector_map specialization. |
|
Trait that detects a sorted_vector_set specialization. |
|
Trait testing whether the |
|
A trait type to test whether a type follows the is‐transparent protocol. |
|
A type to check if a given type is an unbounded array. |
|
A trait type that is true when T is an unsigned type. |
|
A parsed JSON Patch document, as described in RFC 6902 "JSON Patch". |
|
A parsed JSON Pointer, as described in RFC 6901 "JSON Pointer". |
|
Kahan (Kahan‐Babushka‐Neumaier) compensated summation accumulator. |
|
Maps a type to itself, and maps |
|
A trait to replace the cvref category of |
|
literal_c_str |
|
literal_string |
|
A trait that yields the signed integer type corresponding to T. |
|
A trait that yields the unsigned integer type corresponding to T. |
|
A callable wrapper that manually asserts the |
|
A reference wrapper that manually asserts the |
|
A value wrapper that manually asserts the |
|
A type aligned at least as strictly as the most‐aligned fundamental type. |
|
member_pointer_traits |
|
nestable_coded_rich_error |
|
nonesuch |
|
not_null specializable class. |
|
not_null_base, the common interface for all not_null subclasses. ‐ Implicitly constructs and casts just like a PtrT. ‐ Has unwrap() function to access the underlying PtrT. |
|
Awaitable that unwinds a |
|
Awaitable that unwinds an owned |
|
|
Extension point yielding an order‐preserving reinsertion view of a container. |
|
Extension point returning a reinsertion view or the argument itself. |
mimic: std::partial_ordering, c++20 (partial) |
|
A const‐propagating wrapper around a pointer‐like type. |
|
Defines an RCU domain that scopes readers and updaters together. |
|
Base class giving derived objects preallocated RCU retirement storage. |
|
A reentrant mmap‐based allocator. |
|
Configuration options for |
|
Like |
|
A type trait to remove all const volatile and reference qualifiers on a type T |
|
Reproducible floating‐point accumulator via binned floating‐point arithmetic. |
|
Reproducible floating‐point accumulator via binned floating‐point arithmetic. |
|
A value, an error ( |
|
A rich error carrying a user‐defined base type and a formatted message. |
|
Base class for exceptions that carry a queryable rich error code. |
|
|
Aggregates a rich error's base types with the codes it owns. |
Maps an error‐code enum onto the rich‐error machinery. |
|
Query object used to retrieve the rich error code from an exception. |
|
|
|
A message that can automatically capture source locations. |
|
Quacks like |
|
Class template that wraps a reference to an rvalue. Similar to std::reference_wrapper but with three important differences: |
|
Primary trait template that measures the |
|
Computes the |
|
shared_from_this_ptr |
|
A lock‐holder base which holds shared locks, usable with any shared mutex. |
|
A lock‐guard which holds shared locks, usable with any shared mutex type. |
|
Specialize heap_vector_map to integral key type and std::less comparaison. small_heap_map achieve a very fast find for small map < 200 elements. |
|
Forward declaration of the small_vector container. |
|
Tag type indicating a container is sorted but not necessarily unique. |
|
Tag type indicating a container is sorted and unique. |
|
A sorted_vector_map is similar to a sorted_vector_set but stores <key,value> pairs instead of single elements. |
|
A sorted_vector_set is a container similar to std::set<>, but implemented as a sorted array with std::vector<>. |
|
splitmix64_engine |
|
static_function_deleter |
|
Tag type signaling that a work‐tree was stopped (aka cancelled). |
|
|
|
|
|
Holds the result type of a valid |
|
tag_t tag |
|
A container adapter that builds a version of |
|
A synchronized value with a per‐thread cache for accelerated reads. |
|
Alphabet mapping a digit value to its ASCII character, lower‐ or upper‐case. |
|
Holds an integral value for conversion to a floating‐point target type. |
|
Holds a floating‐point value for conversion to an integral target type. |
|
Holds an integral value for possibly‐narrowing conversion to a target type. |
|
Adapter that marks a type as transparent for heterogeneous lookup. |
|
uint_division_result |
|
uint_divisor |
|
A UTF‐8 encoding of a single Unicode code point. |
|
Exception thrown when Unicode decoding or encoding fails. |
|
unique_hash_key |
|
unique_hash_key_with |
|
A lock‐holder base which holds exclusive locks, usable with any mutex type. |
|
A lock‐guard which holds exclusive locks, usable with any mutex type. |
|
Convertible to any default‐constructible type, yielding a default‐initialized value on conversion. |
|
Convenience base or member that tags a type as unsafe for async usage. |
|
Conditionally tags a type as unsafe for async usage. |
|
A lock‐holder type which holds upgrade locks, usable with any upgrade mutex. |
|
A lock‐holder base which holds upgrade locks, usable with any upgrade mutex. |
|
A |
|
variadic_constant_of variadic_constant_of_fn |
|
vtag_t vtag |
|
Decoded x86 cpuid cache descriptor for one cache level. |
|
Vendor identification string as returned by the cpuid instruction. |
|
xoshiro256++ pseudo‐random number generator. |
Type Aliases
Name |
Description |
Standard‐conforming allocator that draws memory from an Arena. |
|
A queue of operations backed by an AsyncIO context. |
|
Base observer‐container type for AsyncSocket observers. |
|
Alias kept for backward compatibility with older transport wrapper names. |
|
AtomicUnorderedInsertMap64 is just a type alias that makes it easier to select a 64 bit slot index type. Use this if you need a capacity bigger than 2ˆ30 (about a billion). This increases memory overheads, obviously. |
|
Alias for BaseFormatterImpl with an index sequence built from |
|
Specialization for |
|
Specialization of |
|
A read‐only view over a sequence of bytes. |
|
Pair of IPAddress, netmask |
|
Pair of IPAddressV4, netmask |
|
Pair of IPAddressV6, netmask |
|
Callback type for functions scheduled on an executor. |
|
A concurrent sorted map with payloads stored inline in the leaves. |
|
A concurrent sorted map with separately stored payloads. |
|
A concurrent sorted set built on ConcurrentBSkipList. |
|
SIMD‐backed ConcurrentHashMap based on F14ValueMap. |
|
An intrusive list with const‐time size() method. |
|
DMPMCQueue |
|
DMPSCQueue |
|
DSPMCQueue |
|
DSPSCQueue |
|
Default reference‐count type used by the read‐mostly smart pointers. |
|
Alias for the default vector type used by xoshiro256pp. |
|
Unique pointer that destroys a DelayedDestruction object via destroy(). |
|
The default distributed mutex, ready to use without template arguments. |
|
folly::Duration is an alias for the best resolution we offer/work with. However, it is not intended to be used for client code ‐ you should use a descriptive std::chrono::duration type instead. e.g. do not write this: |
|
Dynamic token bucket with an adjustable rate and burst size using the default policy. |
|
Alias for an Expected type's associated error_type |
|
Alias for an Expected type's associated value_type |
|
Arena allocator that falls back to std::allocator when the arena is exhausted. |
|
The FallbackGetcpu specialization selected for the current platform. |
|
SysArena allocator that falls back to std::allocator when exhausted. |
|
A fixed‐capacity string of |
|
A move‐only callable holding a unit of work with no arguments or result. |
|
Function type that returns the deadlock detector factory instance. |
|
GroupVarint codec for 32‐bit values. |
|
GroupVarint decoder for 32‐bit values. |
|
GroupVarint codec for 64‐bit values. |
|
GroupVarint decoder for 64‐bit values. |
|
A hashed hierarchical wheel timer with millisecond resolution. |
|
A hashed hierarchical wheel timer with microsecond resolution. |
|
A higher‐resolution duration alias used where microsecond precision is needed. |
|
Vector of (huge_page_size, mount_point), sorted by huge_page_size. mount_point might be empty if no hugetlbfs file system is mounted for that size. |
|
Callable that creates an IOBuf with the requested capacity. |
|
Type of the identity function object. |
|
An alias for Ignore that accepts and ignores any type arguments. |
|
IndexedMemPool traits that implements the eager lifecycle strategy. In this strategy elements are constructed when they are allocated from the pool and destroyed when recycled. |
|
IndexedMemPool traits that implements the lazy lifecycle strategy. In this strategy elements are default‐constructed the first time they are allocated, and destroyed when the pool itself is destroyed. |
|
An intrusive list. |
|
An auto‐unlink intrusive list hook. |
|
A trait to test whether T is one of the types T1, T2, ..., Tn. |
|
Callable that returns information about lagging queues. |
|
LifoSem is a semaphore that wakes its waiters in a manner intended to maximize performance rather than fairness. It should be preferred to a mutex+condvar or POSIX sem_t solution when all of the waiters are equivalent. It is faster than a condvar or sem_t, and it has a shutdown state that might save you a lot of complexity when it comes time to shut down your work pipelines. LifoSem is larger than sem_t, but that is only because it uses padding and alignment to avoid false sharing. |
|
/////////////////////////////////////////////////////////////////// |
|
Function type that builds a QueueObserverFactory. |
|
Caches the resolved MIB for a |
|
Executor that meters how many tasks it feeds into a wrapped executor. |
|
Default MicroLock specialization with the standard spin and yield budget. |
|
A mutable view over a sequence of bytes. |
|
A mutable view over a sequence of |
|
When used in conjunction with |
|
Within the definition of interface |
|
Priority queue set with multi‐producer, multi‐consumer queues. |
|
Priority queue set with multi‐producer, single‐consumer queues. |
|
Priority queue set with single‐producer, multi‐consumer queues. |
|
Priority queue set with single‐producer, single‐consumer queues. |
|
An |
|
The base hash‐key type underlying RegexMatchCacheKey. |
|
A token/data pair used to populate a RequestContext. |
|
Single‐producer version of SmallExecutor. It is the responsibility of the caller to guarantee that calls to add() are externally serialized, but it can be slightly faster. |
|
Shared‐ownership pointer to an SSLContext. |
|
A safe intrusive list. |
|
A safe‐link intrusive list hook. |
|
Executor that runs added tasks serially and in order on a parent executor. |
|
Default SharedMutex; an alias for the write‐priority variant. |
|
SharedMutex variant that gives priority to readers. |
|
SharedMutex variant that suppresses ThreadSanitizer rwlock annotations. |
|
SharedMutex variant that tracks the id of the owning thread. |
|
SharedMutex variant that gives priority to writers. |
|
Maps socket option keys to integer control‐message values. |
|
Maps socket option keys to string control‐message values. |
|
Maps socket option keys to their values. |
|
A read‐only view over a sequence of |
|
Standard‐conforming allocator backed by a SysArena. |
|
A unique_ptr owning a |
|
Standard‐conforming allocator backed by a ThreadCachedArena. |
|
Token bucket with a fixed rate and burst size using the default policy. |
|
Unbounded multi‐producer, multi‐consumer queue. |
|
Unbounded multi‐producer, single‐consumer queue. |
|
Unbounded single‐producer, multi‐consumer queue. |
|
Unbounded single‐producer, single‐consumer queue. |
|
Maps user‐defined counter names to their metric values. |
|
* _t |
|
Type used by hazptr_array and hazptr_local. |
|
An uninitialized storage type suitable for holding an object of type T. |
|
An uninitialized storage type of the given length and alignment. |
|
Mimic the invoke suite of traits for tuple based apply invocation |
|
The result type of applying |
|
The effective value type of an atomic‐like type. |
|
Behaves just like std::back_insert_iterator except that it calls emplace_back() instead of insert(). Uses perfect forwarding. |
|
An aligned wrapper for T using at least cache‐line alignment. |
|
A type alias for |
|
conditional_t |
|
copy_cvref_t |
|
Type of a customization‐point object, deduced from its tag value. |
|
A null‐terminated string view over char. |
|
detected_or |
|
detected_or_t |
|
detected_t |
|
Alias for the type produced by drop_unit. |
|
Behaves just like std::insert_iterator except that it calls emplace() instead of insert(). Uses perfect forwarding. |
|
A helper for defining partial specializations of a hasher class that rely on other partial specializations of that hasher class being usable. |
|
A helper for defining partial specializations of a hasher class that rely on other partial specializations of that hasher class being usable. |
|
erased_unique_ptr |
|
The rich‐error counterpart to |
|
A |
|
|
Options type for fmt_vformat_mangle_format_string. |
|
Options type for format_string_for_each_named_arg. |
Behaves just like std::front_insert_iterator except that it calls emplace_front() instead of insert(). Uses perfect forwarding. |
|
The type of the argument at index |
|
The argument‐list size of the given function type, as an integral_constant. |
|
The function type formed by transporting the cvref of |
|
The function type |
|
The result type of the given function type. |
|
hazard_pointer class name consistent with standard proposal |
|
hazard_pointer_domain class name consistent with standard proposal |
|
hazard_pointer_obj_base class template name consistent with standard proposal |
|
Behaves just like std::insert_iterator except that it calls emplace_hint() instead of insert(). Uses perfect forwarding. |
|
An alias for a std::integral_constant of type std::size_t. |
|
Helper to generate an index sequence from a tuple like type |
|
A signed 128‐bit integer type, where the compiler supports one. |
|
An alias for the signed integer type with |
|
An alias for the signed integer type with the given number of bits. |
|
Holds the result type of invoking |
|
Trait testing whether |
|
Trait testing whether applying |
|
Trait constant that is true when T models the async cleanup concept. |
|
Trait that reports whether T publicly derives from EnablePrimaryFromThis. |
|
Checks that the given hasher template's specialization for the given type is usable with the standard library containters, for example |
|
Checks the requirements that the Hasher class must satisfy in order to be used with the standard library containers, for example |
|
Trait testing whether |
|
Trait testing the nothrow application of |
|
Trait testing whether a nothrow |
|
Trait that is true if |
|
Trait testing whether a |
|
Extracts iterator_category from an iterator. |
|
Extracts a key type from an iterator, leverages the knowledge that key/value containers usually use std::pair<const K, V> as a value_type. |
|
Extracts a mapped type from an iterator. |
|
Extracts reference from an iterator (C++20 iter_reference_t backported) |
|
Extracts a value type from an iterator. |
|
Portable type of a libevent event file descriptor. |
|
Alias for the type produced by lift_unit. |
|
like like_t |
|
An alias for the signed integer type corresponding to T. |
|
An alias for the unsigned integer type corresponding to T. |
|
member_pointer_member_t |
|
member_pointer_object_t |
|
Monotonic clock used as the default time source for stop watches. |
|
Backwards‐compatible alias for |
|
The flag type to be used with call_once. |
|
register_pass_t |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
An alias for the type T with all cv and reference qualifiers removed. |
|
Alias for rich error types to declare fast exception‐lookup hints. |
|
An |
|
A sorted_vector_map backed by a small_vector with inline capacity N. |
|
A sorted_vector_set backed by a small_vector with inline capacity N. |
|
Portable alias for the standard |
|
A type alias for |
|
string_tape ‐ a common usecase. |
|
Digit alphabet producing lowercase letters. |
|
Digit alphabet producing uppercase letters. |
|
type_list_concat_t |
|
type_list_element_t |
|
type_list_find_t |
|
type_list_size_t |
|
In the type pack Ts..., the Ith element. |
|
type_pack_find_t |
|
type_pack_size_t |
|
A type alias for the first template type argument. |
|
An unsigned 128‐bit integer type, where the compiler supports one. |
|
An alias for the unsigned integer type with |
|
An alias for the unsigned integer type with the given number of bits. |
|
Function‐reference type used as the |
|
unique_hash_key_strong_sha256 |
|
Alias to |
|
value_list_concat_t |
|
value_list_element_type_t |
|
value_list_size_t |
|
value_pack_element_type_t |
|
value_pack_size_t |
|
Convenience alias to use instead of |
|
A type alias for |
|
xoshiro256++ generator producing 32‐bit results. |
|
xoshiro256++ generator producing 64‐bit results. |
Enums
Name |
Description |
Defines a special acquisition method for constructing fbstring objects. AcquireMallocatedString means that the user passes a pointer to a malloc‐allocated string that the fbstring object will take into custody. |
|
Consumer::operator() can optionally return AtomicNotificationQueueTaskStatus to indicate if the provided task should be considered consumed or discarded. Discarded tasks are not counted towards maxReadAtOnce_. |
|
Detailed result of an insertion into a ConcurrentBSkipList. |
|
Wraps errors from parsing IP/MASK string |
|
Error codes describing why a string‐to‐value conversion failed. |
|
Error reported when a varint cannot be decoded. |
|
Output style for the default glog‐based |
|
Error codes for non‐throwing interface of IPAddress family of functions. |
|
Selects how Skipper reads a key slot under concurrent writes. |
|
Selects how leaf key/payload data is laid out in memory. |
|
Log level values. |
|
Error codes reported when parsing or constructing a MacAddress fails. |
|
The outcome of a park operation. |
|
Unit families understood by prettyPrint and prettyToDouble. |
|
Process phases |
|
Behavior of a queue when an item is added while the queue is full. |
|
Categories of SSL failure reported by SSLException. |
|
Whether an atomic write syncs to storage to guarantee ordering. |
|
Selects which threads' thread‐local instances are destroyed. |
|
Controls whether a wait node is retained and whether unparking continues. |
|
overloadbrief URI‐escape a string. |
|
Error codes for parsing issues. Used by tryFromString() |
|
Result code returned by UUID parsing functions. |
|
Flags given by the application for write* calls. |
|
The lock mode reported to ThreadSanitizer rwlock annotations. |
|
Error codes reported by args‐file expansion. |
|
Three‐way comparison result: less‐than, equal, or greater‐than. |
|
A hierarchy of memory‐safety levels for a type, from least to most safe. |
|
Recognized x86 CPU vendors. |
Functions
Name |
Description |
Printer for GTest. |
|
Folly's tuned |
|
Set the first |
|
|
|
Acquire locks for multiple Synchronized<T> objects, in a deadlock‐safe manner. |
|
A version of acquireLocked() that returns a std::pair rather than a std::tuple, which is easier to use in many places. |
|
Activate the specified AsyncStackFrame on the specified AsyncStackRoot, setting it as the current 'topFrame'. |
|
Push a dummy "leaf" frame into the stack to annotate the stack as "suspended". |
|
Adds a benchmark. Usually not called directly but instead through the macro BENCHMARK defined below. The lambda function involved can have one of the following forms: * take zero parameters, and the benchmark calls it repeatedly * take exactly one parameter of type unsigned, and the benchmark uses it with counter semantics (iteration occurs inside the function). * 2 versions of the above cases but also accept UserCounters& as as their first parameter. |
|
|
|
|
|
A special case of memcpy() that always copies memory forwards. (libc's memcpy() is allowed to copy memory backwards, and will do so when using SSSE3 instructions). |
|
Free memory previously obtained from |
|
Allocate |
|
Allocate storage for |
|
Creates a not_null_shared_ptr using an allocator, like std::allocate_shared. |
|
Allocate a |
|
allocate_unique, like std::allocate_shared but for std::unique_ptr |
|
Return the number of bytes |
|
Encode a single Unicode code point into a UTF‐8 byte sequence. |
|
Applies the given socket options to a socket at the given position. |
|
|
|
Emits a compiler barrier preventing reordering of memory accesses. |
|
Emits a CPU pause/yield hint suitable for spin‐wait loops. |
|
assume(cond) informs the compiler that cond can be assumed true. If cond is not true at runtime the behavior is undefined. |
|
|
assume_unreachable() informs the compiler that the statement is not reachable at runtime. It is undefined behavior if the statement is actually reached. |
Issue a heavyweight asymmetric thread fence. |
|
Issue a lightweight asymmetric thread fence. |
|
Run a callable asynchronously on the global CPU executor. |
|
|
Compare‐exchange (strong) that works around a TSAN bug in the standard library version. |
|
Compare‐exchange (weak) that works around a TSAN bug in the standard library version. |
|
|
available_concurrency |
|
Convenience function to construct a folly::back_emplace_iterator, analogous to std::back_inserter(). |
|
|
|
|
|
|
|
|
|
|
|
Encode a byte range to standard base64 at runtime. |
|
Compute the encoded size for standard base64. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Encode a byte range to URL‐safe base64 at runtime. |
|
Compute the encoded size for URL‐safe base64. |
|
Deserialize benchmark results from a dynamic value. |
|
Serialize benchmark results into a dynamic value. |
|
Reverse the order of the bits in n. |
|
Evict cache lines by writing to a large block of memory. |
|
Calculates the size of the LLC (Last Level Cache, typically L3 on x86‐64). |
|
|
|
|
|
|
|
Return whether nallocx() is supported by the current allocator. |
|
Return whether sdallocx() is supported by the current allocator. |
|
This returns true if the current platform supports setting the name of the current thread. |
|
This returns true if the current platform supports setting the name of threads other than the one currently executing. |
|
Merge the given tokens into a single CancellationToken. |
|
|
|
Perform some consistency checks on the specified AsyncStackFrame, assuming that it is the currently active AsyncStackFrame. |
|
Checks the return value from a fopen‐style function (non‐null |
|
Checks the return value from a fopen‐style function and throws using an explicit saved |
|
Checks a Linux kernel‐style return code (>= 0 on success, negative error number on error) and throws on error. |
|
Checks a POSIX return code (0 on success, error number on error) and throws on error. |
|
Checks a traditional Unix return code (‐1 and sets |
|
Checks a traditional Unix return code (‐1 on error) and throws using an explicit saved |
|
Allocate |
|
Allocate uninitialized storage for |
|
Trivial wrapper around calloc that check for allocation failure and throw std::bad_alloc in that case. |
|
Trivial wrapper around malloc that check for allocation failure and throw std::bad_alloc in that case. |
|
Trivial wrapper around realloc that check for allocation failure and throw std::bad_alloc in that case. |
|
|
|
Divide two integers, reporting division by zero. |
|
Compute the remainder of integer division, reporting division by zero. |
|
Multiply two unsigned integers, reporting overflow instead of wrapping. |
|
Compute base * mul + add for unsigned integers, reporting overflow. |
|
Clear the n least significant bits of x, leaving the others unchanged. |
|
Clear the n most significant bits of x, leaving the others unchanged. |
|
|
|
|
Converts a list of strings into a null‐pointer‐terminated array of C strings borrowing the storage of the input strings. |
|
|
Encodes a single Unicode code point as a UTF‐8 string. |
|
Resize a vector and shrink its capacity to fit. |
|
Like compareJson, but with dynamic instances. |
|
Like compareJsonWithTolerance, but operates directly on the dynamics. |
|
Compares two JSON strings and returns whether they represent the same document (thus ignoring things like object ordering or multiple representations of the same number). |
|
Like compareJson, but if strNestingDepth > 0 then contained strings that are valid JSON will be compared using compareJsonWithNestedJson(str1, str2, strNestingDepth ‐ 1). |
|
Like compareJson, but allows for the given tolerance when comparing numbers. |
|
Permits the compiler to assume the truth of the provided expression. |
|
|
Permits the compiler to assume the two pointers address separate storage. |
|
Permits the compiler to assume that this statement cannot be reached. |
Marks |
|
Marks |
|
Creates a |
|
|
|
|
|
Casts |
|
Read an unaligned value of type T and return it. Constexpr, but not optimized. Accepts inputs either of char‐array types or char‐backed enum‐array types. |
|
Read an unaligned value of type T and return it. Constexpr, but not optimized. Accepts inputs either of char‐array types or char‐backed enum‐array types. |
|
Compute the absolute value of a number. |
|
Add two values, clamping to the type's range on overflow. |
|
constexpr_ceil |
|
|
|
|
|
|
|
constexpr_find_first_set |
|
constexpr_find_last_set |
|
constexpr_floor |
|
Test whether a value is NaN. |
|
constexpr_log |
|
Compute the integer base‐2 logarithm of a value. |
|
Compute the ceiling of the integer base‐2 logarithm of a value. |
|
Return the maximum of the given values. |
|
Return the minimum of the given values. |
|
constexpr_mult |
|
|
|
constexpr_round |
|
Compares two null‐terminated strings at compile time. |
|
Computes the length of a null‐terminated string at compile time. |
|
Subtract two values, clamping to the type's range on overflow. |
|
|
|
This function checks whether container contains given key. Use container specific .contains() implementation if available, otherwise uses .find() implementation. |
|
Return a well‐typed representation of a dynamic. |
|
copy |
|
copy_through_shared_ptr |
|
copy_through_unique_ptr |
|
copy_to_erased_unique_ptr |
|
copy_to_shared_ptr |
|
copy_to_unique_ptr |
|
Frees memory allocated with coreMalloc(). |
|
An allocator that can be used with AccessSpreader to allocate core‐local memory. |
|
|
|
Compute the CRC‐32 checksum of a buffer, using a hardware‐accelerated implementation if available or a portable software implementation as a default. |
|
Given two checksums, combine them in to one checksum. |
|
Compute the CRC‐32 checksum of a buffer, using a hardware‐accelerated implementation if available or a portable software implementation as a default. |
|
Compute the CRC‐32C checksum of a buffer, using a hardware‐accelerated implementation if available or a portable software implementation as a default. |
|
Combine two CRC‐32C checksums into one, like crc32_combine() but using the CRC‐32C polynomial. |
|
crc32c_combine_seed is the same as crc32c_combine. Unlike crc32c_combine that only works for crc32c computed using a starting checksum 0U, this method works for any starting checksum that is an uint32_t. |
|
current_exception |
|
A convenience shorthand for |
|
Deactivate the specified AsyncStackFrame, clearing the current 'topFrame'. |
|
Pop the dummy "leaf" frame off the stack to annotate the stack as having resumed. |
|
Free storage for |
|
Decode a value from a given buffer, advances data past the returned value. Throws on error. |
|
Reverse the ZigZag encoding produced by encodeZigZag. |
|
Access the process‐wide default hazard pointer domain. |
|
Wraps |
|
|
|
Report whether demangling was built with cxxabi support. |
|
Report whether demangling was built with libiberty support. |
|
Returns whether an outcome represents a fresh insert or a revive. |
|
Returns num/denom, rounded toward positive infinity. Put another way, returns the smallest integral value that is greater than or equal to the exact (not rounded) fraction num/denom. |
|
Returns num/denom, rounded toward negative infinity. Put another way, returns the largest integral value that is less than or equal to the exact (not rounded) fraction num/denom. |
|
Returns num/denom, rounded away from zero. If num and denom are non‐zero and have different signs (so the unrounded fraction num/denom is negative), returns divFloor, otherwise returns divCeil. If T is an unsigned type then this is always equal to divCeil. |
|
Returns num/denom, rounded toward zero. If num and denom are non‐zero and have different signs (so the unrounded fraction num/denom is negative), returns divCeil, otherwise returns divFloor. If T is an unsigned type then this is always equal to divFloor. |
|
Ensure that a value is computed even after optimization. |
|
|
|
|
|
Duplicates a file descriptor onto another, retrying on EINTR. |
|
Duplicates a file descriptor, retrying on EINTR. |
|
|
|
Convenience function to construct a folly::emplace_iterator, analogous to std::inserter(). |
|
empty_erased_unique_ptr |
|
|
Route hazard pointer reclamation through the global CPU thread pool executor. |
Encode a value in the given buffer, returning the number of bytes used for encoding. buf must have enough space to represent the value (at least kMaxVarintLength64 bytes to encode arbitrary 64‐bit values) |
|
Determine the number of bytes needed to represent "val". 32‐bit values need at most 5 bytes. 64‐bit values need at most 10 bytes. |
|
ZigZag encoding that maps signed integers with a small absolute value to unsigned integers with a small (positive) values. Without this, encoding negative values using Varint would use up 9 or 10 bytes. |
|
Composes a task with an async cleanup that always runs after it. |
|
Adapts a range so a range‐based for loop can also observe the iteration index. |
|
|
|
|
|
|
|
Pretty print an errno. |
|
Returns the most appropriate error category for |
|
|
|
|
|
Whether exception‐ptr object inspection is supported on this platform. |
|
|
|
|
|
Returns the true runtime type info of the exception as stored. |
|
|
exception_ptr_try_get_object_exact_fast |
Returns whether the stored exception is uniquely referenced. |
|
Returns the reference count of the stored exception. |
|
Replaces the state of a PrimaryPtr with a new value and returns the old one. |
|
Exchange the current thread's active AsyncStackRoot with the specified AsyncStackRoot pointer, returning the old AsyncStackRoot pointer. |
|
extractFirstSet |
|
Synchronizes a file's data to storage, retrying on EINTR. |
|
Utility method to help access elements of a sequence with one uniform interface. |
|
|
|
Linear search for a value in a range whose size is known at compile time. |
|
findLastSet |
|
Compute the 128‐bit Rabin fingerprint of a string. Return the 64 most significant bits in *msb, and the 64 least significant bits in *lsb. |
|
Return the 64‐bit Rabin fingerprint of a string. |
|
Compute the 96‐bit Rabin fingerprint of a string. Return the 64 most significant bits in *msb, and the 32 least significant bits in *lsb. |
|
Applies an advisory lock, retrying on EINTR. |
|
|
|
|
Builds a dynamic format‐args store from the key/value pairs in |
|
|
folly::for_each is a generalized iteration algorithm. Example: |
|
|
|
Forwards a value with the value category of another type. |
|
Get a tuple of references from the passed tuple, forwarding will be applied on the individual types of the tuple based on the value category of the passed tuple |
|
Convenience function to construct a folly::front_emplace_iterator, analogous to std::front_inserter(). |
|
Synchronizes a file's state to storage, retrying on EINTR. |
|
Truncates a file by descriptor, retrying on EINTR. |
|
Given an initial AsyncStackFrame, this will write |
|
folly::getBaseLoggingConfig() allows individual executables to easily customize their default logging configuration. |
|
|
methodset Deprecated |
Get access to the current thread's top‐most AsyncStackRoot. |
|
Get a process‐specific identifier for the current thread. |
|
Equivalent to getThreadName(std::this_thread::get_id()); |
|
Get a pointer to a special frame that can be used as the root‐frame for a chain of AsyncStackFrame that does not chain onto a normal call‐stack. |
|
|
methodset Deprecated |
Returns the current thread's executor blocking context, if any is active. |
|
methodset Executors |
|
methodset Executors |
|
methodset Executors |
|
methodset Executors |
|
Return the mount point for the requested huge page size. 0 = use smallest available. Returns nullptr if the requested huge page size is not available. |
|
Return the huge page size for a device. returns nullptr if device does not refer to a huge page filesystem. |
|
Get list of supported huge page sizes and their mount points, if hugetlbfs file systems are mounted for those sizes. |
|
|
methodset Deprecated |
Return value of MALLCTL_ARENAS_ALL defined in jemalloc's header. |
|
|
|
Get the operating‐system level thread ID for the current thread. |
|
|
|
Gets the named property. |
|
Returns a CancellationToken that can be used to schedule callbacks. The CancellationToken is cancelled when any of SIGTERM and SIGINT signal is received. |
|
Get the name of the given thread, or nothing if an error occurs or the functionality is not available. |
|
methodset Executors |
|
methodset Executors |
|
methodset Executors |
|
Returns a weak keep‐alive to |
|
Get the default XLOG() category name for the given filename. |
|
Read the bit at position idx from an array of unsigned integers. |
|
Calls getpid() and returns the returned value, with a thread‐safe cache in front. The cache is updated in the child after fork(). |
|
|
Weak hook resolving to the deadlock detector factory instance getter. |
|
|
Getters |
|
|
|
|
|
|
|
|
|
|
|
|
|
Get the current process phase. |
|
|
|
Same as |
|
|
|
|
|
|
|
|
|
JemallocNodumpAllocator singleton. |
|
Simple wrapper around nallocx |
|
Safely compares whether |
|
Grows |
|
Returns a hardware timestamp counter value. |
|
hardware_timestamp_measurement_start hardware_timestamp_measurement_stop |
|
Ends precise measurement of a region of code and returns a timestamp. |
|
Returns if string contains std::isspace or std::iscntrl characters. |
|
|
|
Reclaim all retired objects in a domain that are no longer protected. |
|
Access the process‐wide default hazard pointer domain. |
|
Reclaim all retired objects in a domain that are no longer protected. |
|
Push a list of retired objects into a domain for later reclamation. |
|
Retire an object so it is reclaimed once no hazard pointer protects it. |
|
hazptr_tc_evict ‐‐ Used only for benchmarking |
|
Access the thread‐local hazard pointer cache. |
|
Report whether hazard pointer reclamation may use an executor. |
|
|
|
hex_decode_digit |
|
hex_decode_digit_flavor_aarch64 |
|
|
hex_decode_digit_flavor_x86_64 |
hex_decode_digit_raw |
|
|
hex_decode_digit_raw_flavor_aarch64 |
|
hex_decode_digit_raw_flavor_x86_64 |
hex_decode_digit_table |
|
hex_decoded_digit_is_valid |
|
hex_is_digit |
|
hex_is_digit_flavor_aarch64 |
|
|
hex_is_digit_flavor_x86_64 |
hex_is_digit_table |
|
|
|
Convenience function to construct a folly::hint_emplace_iterator, analogous to std::inserter(). |
|
|
|
Returns the argument unchanged. |
|
|
Initializes folly (deprecated non‐RAII form). |
|
|
|
|
initializeLoggerDB() will be called to configure the main LoggerDB singleton the first time that LoggerDB::get() is called. |
|
Wraps the invocable for lazy conversion to its result type. |
|
|
|
|
invoke_noreturn_cold |
|
|
Returns true if and only if a LogLevel is fatal. |
|
Return true if and only if v is a power of two. |
|
Tests whether all flags of |
|
Returns whether the given leaf frame is currently an active suspended leaf. |
|
Reports whether evaluation occurs in a constant context, with a default. |
|
Determines whether a value is negative, the same as |
|
Determines whether a value is non‐negative, the same as |
|
Determines whether a value is non‐positive, the same as |
|
Determines whether a value is positive, the same as |
|
|
|
|
|
Creates a lazy value whose initialization is deferred until first use. |
|
Safely compares whether |
|
linux_syscall_openat2 |
|
Read an unaligned value of type T and return it. |
|
|
|
|
|
|
|
Get a human‐readable string representing the LogLevel. |
|
Specify characters to ltrim. |
|
Remove leading whitespace. |
|
Creates an |
|
Helper function, so you can write auto bi = makeBitIterator(container.begin()); |
|
Custom Error Translation |
|
Creates a DelayedDestructionUniquePtr owning a new object. |
|
Create a scope guard in the dismissed state. |
|
For constructing an Expected object from a value, with the specified Error type. Usage is as follows: |
|
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** Construct a |
|
Create a scope guard. |
|
Make a MoveWrapper from the argument. Because the name "makeMoveWrapper" is already quite transparent in its intent, this will work for lvalues as if you had wrapped them in std::move. |
|
|
|
|
|
|
|
|
|
For constructing an Unexpected object from an error code. Unexpected objects are implicitly convertible to Expected object in the error state. Usage is as follows: |
|
Hide a value from the optimizer so it cannot shape the following code. |
|
Constructs a std::array with the given argument list. |
|
Generates a std::array<..., Size> with elements m(i) for i in [0, Size).] |
|
Build an atomic_ref referring to the given object. |
|
|
|
|
|
Pack arguments in a tuple for assignment to a folly::emplace_iterator, folly::front_emplace_iterator, or folly::back_emplace_iterator. The iterator's operator= will unpack the tuple and pass the unpacked arguments to the container's emplace function, which in turn forwards the arguments to the (multi‐argument) constructor of the target class. |
|
make_erased_unique |
|
Builds a std::error_code from an args‐file expansion error code. |
|
|
|
Builds an |
|
|
|
|
|
|
|
|
|
Creates a not_null_shared_ptr, like std::make_shared. |
|
Creates a not_null_unique_ptr, like std::make_unique. |
|
|
|
|
|
Constructs a std::seed_seq from the given seed value. |
|
Invokes a |
|
Reads a value from jemalloc through the named |
|
Writes a value and reads the previous one through the named |
|
Writes a value to jemalloc through the named |
|
Wraps a callable, asserting the given safety level; see |
|
Wraps a reference, asserting the given safety level; see |
|
Wraps a value, asserting the given safety level; see |
|
Wraps the result of |
|
|
|
The load part of a possibly‐composite memory order. |
|
The store part of a possibly‐composite memory order. |
|
|
|
|
|
|
|
mlock2 is Linux‐only and exists since Linux 4.4 On Linux pre‐4.4 and other platforms fail with ENOSYS. glibc added the mlock2 wrapper in 2.27 https://lists.gnu.org/archive/html/info‐gnu/2018‐02/msg00000.html |
|
Copy a file using mmap(). Overwrites dest. |
|
Return a value of type T with the n least significant bits set. |
|
Return a value of type T with the n most significant bits set. |
|
Return the smallest power of two that is greater than or equal to v. |
|
|
|
Convenience wrappers around some commonly used system calls. The *NoInt wrappers retry on EINTR. The *Full wrappers retry on EINTR and also loop until all data is written. Note that *Full wrappers weaken the thread semantics of underlying system calls. |
|
Coawait operators |
|
User‐defined literal building a cstring_view from a string literal. |
|
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * User‐defined literals for creating FixedString objects from string literals on the compilers that support it. |
|
Creates a |
|
Creates a |
|
Creates a |
|
Creates a |
|
Creates a |
|
Creates a |
|
User‐defined literal yielding the literal string value. |
|
User‐defined literal yielding a value tag of the literal string. |
|
Creates a shell command formatter from a string literal. |
|
|
|
operator""_uzic |
|
Modulus operators |
|
operator%= |
|
Bitwise conjunction operators |
|
Intersects |
|
Multiplies two dynamics. |
|
Addition operators |
|
Add an integer to a LogLevel in place, capping at LogLevel::MAX_LEVEL. |
|
Subtraction operators |
|
Subtract an integer from a LogLevel in place. |
|
Division operators |
|
operator/= |
|
Right shift operators |
|
Bitwise‐XORs two dynamics. |
|
|
|
|
|
Bitwise disjunction operators |
|
Unions |
|
Computes the complement of a flag set. |
|
|
|
Combine multiple |
|
Parse a json blob out of a range and produce a dynamic representing it. |
|
|
Parse an experimental json5 blob and produce a dynamic representing it. |
|
|
Parse a log configuration string. |
|
Parse a folly::dynamic object. |
|
Parse a JSON configuration string. |
|
|
|
|
|
Read l bytes into the low bits of a value of an unsigned integral type T, where l < sizeof(T). |
|
///////////////////////////////////////////////////////////////////////////// |
|
|
|
///////////////////////////////////////////////////////////////////////////// |
|
///////////////////////////////////////////////////////////////////////////// |
|
///////////////////////////////////////////////////////////////////////////// |
|
Pop the 'callee' frame off the stack, restoring the parent frame as the current frame. |
|
popcount |
|
Like readFull but reads at a given offset. |
|
Reads from a file descriptor at an offset, retrying on EINTR. |
|
Reads into multiple buffers from a file at a given offset. |
|
Like readvFull but scatter‐reads at a given offset. |
|
Scatter‐reads from a file descriptor at an offset, retrying on EINTR. |
|
Pretty printer for numbers with units. |
|
|
|
Returns a statically‐allocated C string containing the pretty name of T. |
|
Print a comparison between two sets of benchmark results. |
|
Generates a 64‐bit id that is unique within the process. The returned ids should not be persisted or passed to other processes, and there are no ordering guarantees. |
|
Push the 'callee' frame onto the current thread's async stack, deactivating the 'caller' frame and setting up the 'caller' to be the parent‐frame of the 'callee'. |
|
Like writeFull but writes at a given offset. |
|
Writes to a file descriptor at an offset, retrying on EINTR. |
|
Writes multiple buffers to a file at a given offset. |
|
Like writevFull but gather‐writes at a given offset. |
|
Gather‐writes to a file descriptor at an offset, retrying on EINTR. |
|
|
|
|
|
Return a good seed for a random number generator. |
|
|
|
Waits for all in‐flight deleters in the domain to complete. |
|
Returns the process‐wide default RCU domain. |
|
Retires a pointer, invoking its deleter after a grace period. |
|
Waits for all pre‐existing RCU readers in the domain to complete. |
|
|
|
Wrapper around read() (and pread()) that, in addition to retrying on EINTR, will loop until all data is read. |
|
Reads from a file descriptor, retrying on EINTR. |
|
Like readFull but scatter‐reads into multiple buffers. |
|
Scatter‐reads from a file descriptor, retrying on EINTR. |
|
|
|
|
|
Casts |
|
|
|
Reserves space for |
|
|
|
Wraps the return value from the lambda |
|
Converts a |
|
|
|
|
rethrow_current_exception |
Finds the last occurrence of needle in haystack. The result is the offset reported to the beginning of haystack, or string::npos if needle wasn't found. |
|
Make a shared locking helper for a const object. |
|
|
|
Specify characters to rtrim. |
|
Remove trailing whitespace. |
|
Runs all benchmarks defined. Usually put in main(). |
|
Runs all benchmarks defined if and only if the ‐‐benchmark flag has been passed to the program. Usually put in main(). |
|
Fills the destination buffer with data generated from the seed sequence. |
|
Returns the position of the k‐th 1 in the 64‐bit word x. k is 0‐based, so k=0 returns the position of the first 1. |
|
|
methodset Deprecated |
|
methodset Deprecated |
|
methodset Deprecated |
Install (or, with all‐null arguments, remove) the keep‐alive object tracing hooks. |
|
|
|
methodset Executors |
|
methodset Executors |
|
methodset Executors |
|
Set the n least significant bits of x, leaving the others unchanged. |
|
Set the n most significant bits of x, leaving the others unchanged. |
|
|
|
Start Regular phase and register handler to set Exit phase. To be called exactly once in each program that uses Folly. Ideally, it is to be called from folly::init(), which in turn is to be called by every program that uses Folly. |
|
|
|
|
|
Quotes an argument to make it suitable for use as shell command arguments. |
|
|
Create argument array for |
Shuts down a socket, retrying on EINTR. |
|
Free a buffer previously returned by checkedAlignedMalloc. |
|
Free a buffer previously returned by checkedArrayMalloc<T>. |
|
Frees's memory using sdallocx if possible |
|
DEPRECATED: Use ltrimWhitespace instead |
|
Reallocs if there is less slack in the buffer, else performs malloc‐copy‐free. |
|
Formats a source location as |
|
|
|
Convenience function, allowing us to exploit template argument deduction to improve readability. |
|
split, to an output iterator |
|
splitmix64 |
|
|
|
|
|
|
|
|
|
Casts |
|
Return the index of the first set bit in a bitset, or bitset.size() if none. |
|
Return the index of the first set bit in a bitset after the given index, or bitset.size() if none. |
|
Write an unaligned value of type T. |
|
Return the smallest power of two that is strictly greater than v. |
|
Return the largest power of two that is strictly less than v. |
|
Append printf‐style output to string. |
|
|
|
Construct a LogLevel from a string name. |
|
Append va_list printf‐style output to string. |
|
|
|
De‐indent a string. |
|
Copy a C string, size‐bounded and always null‐terminated (mimics BSD strlcpy). |
|
|
|
Apply |
|
Acquire locks for multiple Synchronized<> objects, in a deadlock‐safe manner. |
|
|
|
|
terminate_with |
Formats a message with fmt and terminates with an exception built from it. |
|
|
|
|
Throws a |
|
|
|
throw_exception |
Formats a message with fmt and throws an exception constructed from it. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Turn an arbitrary type into a dynamic. |
|
Serialize a dynamic into a json string. |
|
|
|
Serialize a dynamic into a json string with indentation. Note that the keys of all objects will be sorted. |
|
|
|
|
|
|
|
|
|
Number of digits in the base‐Base representation of v. |
|
Number of decimal digits in v; alias of to_ascii_size<10>. |
|
|
|
|
|
Constructs a boolean from the argument. |
|
to_erased_unique_ptr |
|
Wraps the argument for floating‐point conversion. |
|
Wraps the argument for integral conversion. |
|
Wraps the argument for narrowing conversion. |
|
Convert a signed comparison value into the matching |
|
to_shared_ptr |
|
|
|
to_shared_ptr_non_owning |
|
Converts the argument to the corresponding signed type. |
|
Converts an enum value to its underlying type. |
|
Converts the argument to the corresponding unsigned type. |
|
to_weak_ptr |
|
to_weak_ptr_aliasing |
|
Atomically transitions from the from‐lock to the to‐lock, waiting unboundedly for the transition to become available. |
|
|
|
Eventually and atomically upgrades an upgrade lock to an exclusive lock. |
|
Immediately and atomically downgrades an exclusive lock to an upgrade lock. |
|
Specify characters to trim. |
|
Remove leading and trailing whitespace. |
|
Truncates a file by path, retrying on EINTR. |
|
Try to move the value/exception from another |
|
A variant of decodeVarint() that does not throw on error. Useful in contexts where only part of a serialized varint may be attempted to be decoded, e.g., when a serialized varint arrives on the boundary of a network packet. |
|
|
|
|
|
Get access to the current thread's top‐most AsyncStackRoot. |
|
Returns the process‐global shutdown socket set, if one has been installed. |
|
Returns the process‐global shutdown socket set using a read‐mostly pointer. |
|
Try to split a string into a fixed number of fields by delimiter, using folly::tryTo<> for conversions. types by delimiter. ‐ On success, all output values will be initialized and the 'Unit{}' value is returned. Arguments are assigned in reverse order. ‐ On failure, the first failing 'ConversionCode' is returned with its associated substring in a 'SubstringConversionCode'. ‐ String splitting is performed prior to each conversion; field values will not contain the delimiter. ‐ All custom error codes are mapped to ConversionCode::CUSTOM. |
|
|
|
|
|
|
|
|
|
|
|
Attempts an atomic transition from the from‐lock to the to‐lock, without waiting if the transition is not immediately available. |
|
Attempts an atomic transition from the from‐lock to the to‐lock, waiting up to the given timeout for the transition to become available. |
|
Attempts an atomic transition from the from‐lock to the to‐lock, waiting up to the given deadline for the transition to become available. |
|
|
|
|
|
|
|
Immediately attempts to atomically upgrade a shared lock to an upgrade lock. |
|
|
Attempts, up to a timeout, to atomically upgrade a shared lock to an upgrade lock. |
|
Attempts, up to a deadline, to atomically upgrade a shared lock to an upgrade lock. |
|
|
Make an upgrade locking helper. |
|
Clears the flags of |
|
uncaught_exceptions |
|
Wraps a function taking N arguments into a function which accepts a tuple of N arguments. Note: This function will also accept an std::pair if N == 2. |
|
Disambiguation tag for constructing an Expected in the error state. |
|
|
|
|
Combines a UTF‐16 surrogate pair into a single code point. |
Encodes a single Unicode code point into a UTF‐8 byte sequence. |
|
|
Hash the input items with SHA256, returning a Size‐byte digest. |
Initializes folly without an RAII scope guard. |
|
Unwrap a tuple of |
|
|
|
|
|
Determines whether the process is using jemalloc. |
|
Determines whether the process is using tcmalloc. |
|
Returns whether a UTF‐16 code unit lies in the Basic Multilingual Plane. |
|
|
Returns whether a UTF‐16 code unit is a high surrogate. |
|
Returns whether a UTF‐16 code unit is a low surrogate. |
Decode a single Unicode code point from UTF‐8 byte sequence. |
|
|
|
Parses a 36‐byte UUID string into a 16‐byte buffer. |
|
Returns whether the given alignment value is valid. |
|
Returns the subset of options that apply to the given family and position. |
|
Does nothing regardless of the arguments passed. |
|
|
|
|
|
|
|
|
|
|
|
Similar to readFull and preadFull above, wrappers around write() and pwrite() that loop until all data is written. |
|
Writes to a file descriptor, retrying on EINTR. |
|
Like writeFull but gather‐writes from multiple buffers. |
|
Gather‐writes to a file descriptor, retrying on EINTR. |
|
x86_cpuid |
|
Returns cache info for the cache with the given id for the given vendor. |
|
|
|
Detects the CPU vendor via the cpuid instruction. |
|
Returns the maximum supported cpuid leaf for the given leaf group. |
|
Tests whether a character is a directory separator. |
|
Strip directory prefixes from a filename before using it in XLOG macros. |
|
Left shift operators |
|
Equality operators |
|
Inequality operators |
|
Less‐than operators |
|
Less‐than‐or‐equal operators |
|
Greater‐than operators |
|
Greater‐than‐or‐equal operators |
|
Three‐way comparison operators |
Variables
Name |
Description |
Tag value indicating that a lock transition should adopt existing lock state. |
|
always_false |
|
Customization point object that flips a bit and returns its previous value. |
|
Customization point object that atomically transforms an atomic value. |
|
Customization point object that resets a bit and returns its previous value. |
|
Customization point object that sets a bit and returns its previous value. |
|
Wakes all threads waiting on the atomic, like futex wake with max count. |
|
Wakes one thread waiting on the atomic, like futex wake with count 1. |
|
Blocks until the atomic changes from an expected value, like futex wait. |
|
Blocks until the atomic changes or a deadline passes, returning cv_status. |
|
The environment variable name used to cap available_concurrency(). |
|
A value corresponding to hardware_constructive_interference_size but which may be used with alignas, since hardware_constructive_interference_size may be too large on some platforms to be used with alignas. |
|
|
constexpr_iterated_squares_desc_2_v |
|
constexpr_iterated_squares_desc_size_v |
|
constexpr_iterated_squares_desc_v |
Global default domain defined in Hazptr.cpp |
|
Maximum symbol size that demangling will attempt, or 0 for no limit. |
|
An empty socket option map. |
|
The empty‐`Try`‐as‐error policy value. |
|
Tag value selecting the factory constructor of |
|
|
Callable that mangles the content of vformat format‐strings. |
|
Callable object enumerating the named arguments of a format string. |
The number of arguments in the given function type. |
|
True precisely when the given function type is marked noexcept. |
|
True precisely when the given function type is C‐style variadic. |
|
|
The cache line size for true sharing, from the standard library. |
The minimum spacing to avoid false sharing, from the standard library. |
|
has_extended_alignment |
|
hex_alphabet_lower |
|
hex_alphabet_table |
|
hex_alphabet_upper |
|
Tag value used to disambiguate initializer‐list construction. |
|
is_allocator_v is_allocator |
|
True if applying |
|
True if |
|
A trait variable that is true when T is an arithmetic type. |
|
is_bounded_array_v is_bounded_array |
|
A specialization of is_bounded_array_v for bounded array types. |
|
True when T models the async cleanup concept (has a conforming cleanup()). |
|
See is_complete. |
|
|
is_constexpr_default_constructible_v is_constexpr_default_constructible |
True when |
|
Whether a type declares a |
|
A trait variable to test whether a metafunction succeeds in substitution. |
|
|
True if T publicly derives from EnablePrimaryFromThis. |
Checks that the given hasher template's specialization for the given type is usable with the standard library containters, for example |
|
Checks the requirements that the Hasher class must satisfy in order to be used with the standard library containers, for example |
|
True if T is an instantiation of heap_vector_map. |
|
True if T is an instantiation of heap_vector_set. |
|
is_instantiation_of_v is_instantiation_of instantiated_from uncvref_instantiated_from |
|
A specialization of is_instantiation_of_v for matching instantiations. |
|
A trait variable that is true when T is an integral type. |
|
True if invoking |
|
True if |
|
is_non_bool_integral_v |
|
True if the nothrow application of |
|
True if |
|
True if a nothrow invocation of |
|
True if |
|
|
True if a nothrow |
True if the |
|
A trait variable that is true when T is one of the types Ts. |
|
is_register_pass_v |
|
Whether an lvalue reference may be passed in a register; always true. |
|
Whether an rvalue reference may be passed in a register; always true. |
|
A trait variable that is true when T is a signed type. |
|
|
True if T is a sorted_vector_map backed by a small_vector. |
|
True if T is a sorted_vector_set backed by a small_vector. |
|
|
True if T is a sorted_vector_map specialization. |
|
True if T is a sorted_vector_set specialization. |
|
True if a |
|
True if the |
|
is_transparent_v is_transparent |
|
is_unbounded_array_v is_unbounded_array |
|
A specialization of is_unbounded_array_v for unbounded array types. |
|
A trait variable that is true when T is an unsigned type. |
|
True when T is the proxy reference type of a std::vector<bool>. |
|
Specialization recognizing the libc++ std::vector<bool> bit reference. |
|
Whether an iterator's category matches Category (std::input_iterator_tag, std::output_iterator_tag, etc). Defined for non‐iterator types as well. |
|
Whether std::distance over a pair of iterators is reasonably known to give the distance without advancing the iterators or copies of them. |
|
Specialization for a matching iterator and sentinel type. |
|
The Clang major version, or zero when not compiling with Clang. |
|
Default maximum number of core‐local slots used by the cached pointers. |
|
The Dinkumware cpplib version, or zero when not using cpplib. |
|
The default log level used when none is specified. |
|
True when libstdc++ assertions are enabled. |
|
The libstdc++ release version, or zero when not using libstdc++. |
|
The GCC major version, or zero when not compiling with GCC. |
|
True when the current build supports C++ exceptions. |
|
True when run‐time type information (RTTI) is enabled for this build. |
|
True when the target platform supports unaligned loads and stores. |
|
True when the toolchain supports weak symbols. |
|
True if integer division on this platform yields a remainder, i.e. the hardware division instruction produces both quotient and remainder. |
|
Maximum number of |
|
True when the target operating system is Android. |
|
True when the target operating system is an Apple platform. |
|
True when the target Apple platform is iOS. |
|
True when the target Apple platform is macOS. |
|
True when the target Apple platform is tvOS. |
|
True when the target Apple platform is watchOS. |
|
True when targeting the 64‐bit ARM (AArch64) architecture. |
|
True when targeting the 64‐bit x86 (amd64) architecture. |
|
True when targeting the 32‐bit ARM architecture. |
|
True when targeting the 64‐bit PowerPC architecture. |
|
True when targeting the 64‐bit RISC‐V architecture. |
|
True when targeting the 64‐bit IBM Z (s390x) architecture. |
|
True when targeting WebAssembly. |
|
True when targeting 32‐bit WebAssembly. |
|
True when targeting 64‐bit WebAssembly. |
|
True when targeting the 32‐bit x86 architecture. |
|
True when the target platform is big‐endian. |
|
True when compiling with Clang. |
|
True when the current build is a debug build. |
|
True when the target operating system is FreeBSD. |
|
True when the standard library is GNU libstdc++. |
|
True when the standard library is LLVM libc++. |
|
True when folly itself was compiled with AddressSanitizer enabled. |
|
True when the standard library is GNU libstdc++. |
|
True when the target operating system is non‐mobile Linux. |
|
True when the target operating system is Linux, mobile included. |
|
True when the target platform is little‐endian. |
|
True when targeting a mobile platform. |
|
True when the current translation unit is compiled as Objective‐C. |
|
True when the current build is optimized. |
|
True when the current build is optimized for size. |
|
True when the current build uses any sanitizer. |
|
True when the current build uses AddressSanitizer. |
|
True when the current build uses DataFlowSanitizer. |
|
True when the current build uses ThreadSanitizer. |
|
True when the target operating system is Windows. |
|
Environment variable name that controls folly logging configuration. |
|
The compile‐time minimum log level below which XLOG() statements compile out. |
|
Maximum length (in bytes) of the varint encoding of a 32‐bit value. |
|
Maximum length (in bytes) of the varint encoding of a 64‐bit value. |
|
The Microsoft ABI version, or zero when not targeting the Microsoft ABI. |
|
The lowest log level considered fatal for the current build. |
|
The lowest address that may be a valid mapped pointer on this platform. |
|
The MSVC compiler version, or zero when not compiling with MSVC. |
|
Number of bits in a machine word used by the bitset scanning routines. |
|
Write flags that are related to timestamping. |
|
The |
|
Return value that tells for_each to stop iterating. |
|
Return value that tells for_each to continue iterating. |
|
|
True if |
True if type |
|
max_align_v is the alignment of max_align_t. |
|
Constant tag used to clear or construct an empty Optional. |
|
The sentinel value returned by search functions when no match is found. |
|
Whether std::distance over the begin and end iterators is reasonably known to give the distance without advancing the iterators or copies of them. |
|
The pointer to the process‐wide default RCU domain. |
|
register_pass_max_size |
|
require_sizeof |
|
Resizes a container without initializing newly added elements. |
|
Pseudo‐function template handy for disambiguating function overloads. |
|
Tag value indicating a container is sorted but not necessarily unique. |
|
Tag value indicating a container is sorted and unique. |
|
The stopped/cancellation signal value. |
|
The |
|
A generic type‐list value. |
|
Maximum buffer size to hold the base‐Base ASCII form of any value of unsigned type Int. |
|
Maximum buffer size for the decimal ASCII form of Int; alias of to_ascii_size_max<10>. |
|
type_list_find_v |
|
type_list_size_v |
|
type_pack_find_v |
|
type_pack_size_v |
|
|
Digest size in bytes produced by the given hash algorithm object. |
The single value of type Unit. |
|
Object yielding a default‐initialized value on conversion. |
|
value_list_element_v |
|
value_list_size_v |
|
value_pack_element_type_t |
|
value_pack_size_v |
|
An invocable object that ignores its arguments and returns a constant. |
|
A generic value‐list value. |
|
Vendor identification strings indexed by |
Concepts
Name |
Description |
Concept for types supported by folly::findFixed: fixed‐width integers and enums with such an underlying type. |
|
Concept matching types with optional‐like semantics (has_value/value), such as std::optional, folly::Optional, and Thrift optional fields. |
|
A concept satisfied when T is an instantiation of the class template Templ. |
|
Satisfied when |
|
passable_to |
|
Like instantiated_from, but after stripping cvref qualifiers from T. |
|
Concept to check that a type is same as a given type, when stripping qualifiers and refernces. Especially useful for perfect forwarding of a specific type. |
|
Concept satisfied by the proxy reference type of a std::vector<bool>. |
Using Declarations
Name |
Description |
Imported |
|
A trait to test whether values of T and U can be compared with operator==. |
|
A trait to test whether values of T and U can be compared with operator<. |
|
Base that disallows copy but allows move in derived types. |
|
Base that disallows both copy and move in derived types. |
|
/////////////////////////////////////////////////////////////////// |
|
Like std::decay_t but possibly faster to compile. |
|
Sentinel extent value marking a span whose size is known only at runtime. |
|
The result type of invoking |
|
A trait type that is true when one type is nothrow‐convertible to another. |
|
A trait variable that is true when one type is nothrow‐convertible to another. |
|
Most platforms hopefully provide std::nextafter, std::remainder. |
|
Imported |
|
Alias to |
|
The result type of invoking the |
|
Alias to |
folly::array_detail namespace
Implementation helpers for make_array and make_array_with.
Types
Name |
Description |
Resolves the element type of the array produced by make_array. |
Type Aliases
Name |
Description |
Trait that is true when |
|
Trait that is true when the decayed |
|
The std::array type make_array returns for the given element types. |
Functions
Name |
Description |
Builds a std::array by invoking |
folly::async_tracing namespace
Implementation details.
Enums
Name |
Description |
Whether a discarded SemiFuture carried a deferred executor. |
Functions
Name |
Description |
Trace hook invoked for a blocking operation. |
|
Trace hook invoked when a Future is rescheduled onto an executor. |
|
Trace hook invoked when the global CPU executor is retrieved. |
|
Trace hook invoked when the global IO executor is retrieved. |
|
Trace hook invoked when the immutable CPU executor is retrieved. |
|
Trace hook invoked when the immutable IO executor is retrieved. |
|
Trace hook invoked when a SemiFuture is discarded. |
|
Trace hook invoked when a SemiFuture is rescheduled onto an executor. |
|
Trace hook invoked when the global CPU executor is set. |
|
Trace hook invoked when the global CPU executor is set to the immutable one. |
|
Trace hook invoked when the global IO executor is set. |
folly::bind namespace
READ ME: The docs for this library are in Bind.md.
Namespaces
Name |
Description |
Implements standard storage semantics for |
Types
Name |
Description |
The primitive for representing lists of bound args. |
|
|
|
Sugar for |
|
Binds an async‐closure capture whose pointer‐like value is dereferenced once to expose the underlying object. |
|
Sugar for |
|
Binding modifier that binds a const reference to each argument. |
|
Binding modifier that makes each argument |
|
Binding modifier that passes its arguments as decay‐copied prvalues. |
|
The "identifier tag ‐> storage type" signature for a named binding. |
|
Binding modifier that passes its arguments as rvalue references. |
|
Binding modifier that keeps each argument mutable. |
|
Binding modifier that binds a mutable reference to each argument. |
|
The self‐reference "identifier tag ‐> storage type" binding signature. |
Functions
Name |
Description |
Bind an in‐place‐constructed capture of type |
|
Bind an in‐place‐constructed capture built by a factory function. |
|
Binds in‐place construction of |
|
Binds in‐place construction via a maker callable plus the given arguments. |
|
User‐defined literal building a |
Variables
Name |
Description |
The identifier for the compile‐time string |
|
A special |
folly::bind::ext namespace
Implements standard storage semantics for folly::bind. This is used (with some additional constraints & tweaks) by async_closure captures. It can also be used for other single‐use data structurs ‐‐ this makes it easy to simultaneously define the types for, and construct, tuples, named tuples, structs, etc. Some examples of this are given in Bind.md.
Types
Name |
Description |
The binding flags for a bound argument. |
|
Policy that maps a binding to the storage type used to hold its value. |
|
Metadata for a single bound argument: its binding type plus binding flags. |
|
A bound‐args list tagged with the identifier string |
|
A binding identifier tag, such as |
|
Base class for any type modeling a list of bound args with modifiers. |
|
Concatenates several |
|
A |
|
Placeholder tag meaning a binding carries no name tag. |
|
A bound‐args list tagged with the self‐reference identifier. |
|
Tag type marking the self‐reference identifier. |
|
Tag and factory for unsafely moving the contents of a |
Type Aliases
Name |
Description |
Deduces the stored binding type for a value passed to |
Enums
Name |
Description |
Category flag controlling how a bound argument is passed or stored. |
|
Constness flag applied to a bound argument. |
Functions
Name |
Description |
Forward a bound storage reference as the argument implied by its bind‐info category. |
Variables
Name |
Description |
The name tag of a binding, or no_tag_t when the binding is unnamed. |
|
Specialization extracting the tag from a named binding info. |
Concepts
Name |
Description |
|
True when the binding type |
folly::bititerator_detail namespace
Implementation details for BitIterator.
Types
Name |
Description |
Provides the boost::iterator_adaptor base type used by BitIterator. |
|
Reference to a bit. |
folly::bser namespace
BSER binary serialization for dynamic values.
Types
Name |
Description |
Exception thrown when BSER‐encoded input cannot be decoded. |
|
Options controlling how a BSER stream is deserialized. |
|
Options controlling how a dynamic value is serialized to BSER. |
Enums
Name |
Description |
Type tags used in the BSER wire format. |
Functions
Name |
Description |
Determine how much data is needed to fully decode a BSER pdu. |
|
|
|
Serialize a dynamic value to a BSER‐encoded string. |
|
Serialize a dynamic value to a BSER‐encoded IOBuf. |
Variables
Name |
Description |
The two‐byte magic prefix that identifies a BSER stream. |
folly::bskip_detail namespace
Internal implementation details for ConcurrentBSkipList.
Namespaces
Name |
Description |
Detects whether a type qualifies as a hardware‐atomic key/payload type. |
Types
Name |
Description |
RAII read guard that starts optimistic and escalates to the shared lock when a writer is in flight. |
|
Lock‐free read slot for hardware‐atomic T. |
|
Node allocator wrapper that rebinds a byte allocator per node type. |
|
Common base of leaf and internal nodes: next pointer, seqlock, and mutex. |
|
Internal (routing) node holding separator keys and child pointers. |
|
Leaf node holding sorted keys, optional payloads, and tombstone bits. |
|
Tuning knobs separated from InternalTraits so they can be adjusted without touching the Traits template parameter set. |
|
Interleaved {key, payload} record for inline (AoS) leaf storage. |
|
Derived compile‐time traits for a ConcurrentBSkipList instantiation. |
|
Leaf key/payload storage policy dispatcher. |
|
Seqlock used to bracket OLC reader/writer access to a node's fields. |
Type Aliases
Name |
Description |
Function‐pointer type for a BSkipList test hook. |
|
Zero‐size payload slot for [[no_unique_address]]in void‐payload templates. |
|
Picks the leaf‐slot storage type for a key/value type T. |
|
Same as KeyStorage but Empty when there's no payload at all. |
Enums
Name |
Description |
Test‐hook event points fired along the concurrent read/split paths. |
|
How an insertion treats an existing live exact‐match key. |
Functions
Name |
Description |
Finds the first slot in [begin, end) whose key sorts after target.] |
|
Fires the global BSkipList test hook (no‐op unless test hooks are built). |
|
Reads a slot optimistically, then validates the read. |
|
Installs the global BSkipList test hook (no‐op unless test hooks are built). |
Variables
Name |
Description |
Default key‐read policy for T: RelaxedAtomic if hardware‐atomic, else Locked. |
|
True when T is a hardware‐atomic (lock‐free, trivially copyable) type. |
folly::bskip_detail::detail_hw_atomic namespace
Detects whether a type qualifies as a hardware‐atomic key/payload type.
Concepts
Name |
Description |
Satisfied when T is trivially copyable and always lock‐free as an atomic. |
folly::channels namespace
Sender/receiver channel primitives for asynchronous value streams.
Types
Name |
Description |
A channel is a sender and receiver pair that allows one component to send values to another. A sender and receiver pair is similar to an AsyncPipe and AsyncGenerator pair. However, unlike AsyncPipe/AsyncGenerator, senders and receivers can be used by memory‐efficient higher level transformation abstractions. |
|
A callback handle for a consumption operation on a channel. The consumption operation will be cancelled when this handle is destroyed. |
|
A list of channel callback handles. When consumeChannelWithCallback is invoked with a list, a cancellation handle is automatically added to the list for the consumption operation. Similarly, when a consumption operation is completed, the handle is automatically removed from the lists. |
|
A fanout channel allows fanning out updates from a single input receiver to multiple output receivers. |
|
A FanoutSender allows fanning out updates to multiple output receivers. Values can be written as with a normal Sender. When there is only one output receiver, the memory used by a FanoutSender (and the corresponding output receiver) is the same as the memory used by a normal channel. |
|
A rate limiter that caps the number of concurrently running operations. |
|
A merge channel allows one to merge multiple receivers into a single output receiver. The set of receivers being merged can be changed at runtime. Each receiver is added with a key that can be used to remove the receiver at a later point. |
|
An event emitted by a merge channel, tagged with the source receiver key. |
|
Event signaling that a receiver was added to the merge channel. |
|
Event signaling that a merged receiver closed. |
|
Event signaling that a receiver was removed from the merge channel. |
|
Empty context used by FanoutChannel when no context is needed. |
|
An OnClosedException passed to a transform or multiplex callback indicates that the input channel was closed. An OnClosedException can also be thrown by a transform or multiplex callback, which will close the output channel. |
|
A rate‐limiter used by the channels framework to limit the number of in‐flight requests. |
|
A receiver that receives values sent by a sender. There are several ways that a receiver can be consumed: |
|
A ReinitializeException thrown by a transform callback indicates that the resumable transform needs to be re‐initialized. |
|
A sender sends values to be consumed by a receiver. |
Functions
Name |
Description |
This function takes a Receiver, and consumes updates from that receiver with a callback. |
|
Creates a new fanout channel that fans out updates from an input receiver. |
|
Creates a new merge channel. |
|
Merge takes a list of receivers, and returns a new receiver that receives all updates from all input receivers. If any input receiver closes with an exception, the exception is forwarded and the channel is closed. If any input receiver closes without an exception, the channel continues to merge values from the other input receivers until all input receivers are closed. |
|
|
|
|
folly::chrono namespace
Time‐related wrappers and clock utilities.
Types
Name |
Description |
Clock interface. |
|
Implementation of ClockInterface for given std::chrono ClockType. |
|
Detects and re‐exports per‐clock traits. |
|
A coarse‐resolution steady clock backed by CLOCK_MONOTONIC_COARSE. |
|
A coarse‐resolution system clock backed by CLOCK_REALTIME_COARSE. |
|
Spec tag shared by all steady clocks with the same epoch and tick rate. |
|
Spec tag shared by all system clocks with the same epoch and tick rate. |
Type Aliases
Name |
Description |
Clock interface backed by std::chrono::steady_clock. |
|
Clock implementation backed by std::chrono::steady_clock. |
|
Clock interface backed by std::chrono::system_clock. |
|
Clock implementation backed by std::chrono::system_clock. |
Variables
Name |
Description |
Pointer to a |
|
Pointer to a function returning the time of a clock in nanoseconds. |
Using Declarations
Name |
Description |
Re‐export of |
|
Re‐export of |
|
Re‐export of |
|
Re‐export of |
folly::compression namespace
Compression and decompression codecs over IOBufs.
Namespaces
Name |
Description |
Process‐wide singleton ZSTD compression context pools. |
|
CPU instruction‐set backends for Elias‐Fano bit operations. |
Types
Name |
Description |
Non‐owning view over a bit‐vector‐encoded list and its sub‐sections. |
|
Encodes a strictly increasing sequence of unsigned integers as a bit vector. |
|
Forward/random‐access reader over a bit‐vector‐encoded integer sequence. |
|
Base class for a compression/decompression codec. |
|
This implementation is slow under contention. Except under uncontended scenarios, you shouldn't use it directly. You likely want to use the CompressionCoreLocalContextPool instead, which, behind the fast cache slots, is backed by this implementation. |
|
Default no‐op callback invoked periodically by CompressionContextPool. |
|
This class is intended to reduce contention on reserving a compression context and improve cache locality (but maybe not hotness) of the contexts it manages. |
|
Non‐templated base class which allows for generic interaction with context pool instances. |
|
Non‐owning view over an Elias‐Fano‐encoded list and its sub‐sections. |
|
Encodes a sorted sequence of unsigned integers using Elias‐Fano coding. |
|
Forward/random‐access reader over an Elias‐Fano‐encoded, non‐decreasing sequence of integers produced by EliasFanoEncoder. |
|
Base class for a codec that also supports a stateful streaming API. |
Type Aliases
Name |
Description |
Read‐only bit‐vector compressed list. |
|
Read‐only Elias‐Fano compressed list. |
|
Mutable bit‐vector compressed list. |
|
Mutable Elias‐Fano compressed list. |
Enums
Name |
Description |
Identifies a compression algorithm. |
Functions
Name |
Description |
Returns a deep copy of a compressed list, owning a freshly allocated buffer. |
|
Returns a codec that can uncompress any of the given codec types as well as {LZ4_FRAME, ZSTD, ZLIB, GZIP, LZMA2, BZIP2}. Appends each default codec to customCodecs in order, so long as a codec with the same type() isn't already present in customCodecs or as the terminalCodec. When uncompress() is called, each codec's canUncompress() is called in the order that they are given. Appended default codecs are checked last. uncompress() is called on the first codec whose canUncompress() returns true. |
|
Return a codec for the given type. Throws on error. The level is a non‐negative codec‐dependent integer indicating the level of compression desired, or one of the following constants: |
|
Return a codec for the given type. Throws on error. The level is a non‐negative codec‐dependent integer indicating the level of compression desired, or one of the following constants: |
|
Check if a specified codec is supported. |
|
Check if a specified codec is supported and supports streaming. |
|
Convert a folly abstract compression level (COMPRESSION_LEVEL_FASTEST, COMPRESSION_LEVEL_DEFAULT, COMPRESSION_LEVEL_BEST) to a raw ZSTD compression level (1‐22). Passes through raw levels in [1, ZSTD_maxCLevel()] unchanged. Throws std::invalid_argument for out‐of‐range levels. |
Variables
Name |
Description |
|
Number of pool checkouts between successive callback invocations. |
Abstract level selecting the best compression. |
|
Abstract level selecting the codec's default compression. |
|
Abstract level selecting the fastest compression. |
|
Size in bytes of a cache line, used to size prefetches. |
|
Trailing bytes that must be readable past the end of the lower bit sequence, required by loadUnaligned<uint64_t> reads in the lower accessor. |
|
Trailing bytes that must be readable past the end of the upper bit sequence, required by loadUnaligned<uint64_t> reads in the upper accessor. |
folly::compression::contexts namespace
Process‐wide singleton ZSTD compression context pools.
folly::compression::instructions namespace
CPU instruction‐set backends for Elias‐Fano bit operations.
Types
Name |
Description |
Portable bit‐operation backend using compiler builtins. |
|
Enums
Name |
Description |
Selects an instruction‐set backend at runtime. |
folly::coro namespace
Coroutine primitives and combinators.
Namespaces
Name |
Description |
Tools for library authors who are building new |
Namespace Aliases
Name |
Description |
Alias for the standard namespace providing coroutine support. |
Types
Name |
Description |
The AsyncGenerator class represents a sequence of asynchronously produced values where the values are produced by a coroutine. |
|
Base class for objects whose lifetime is managed by an |
|
Owning pointer to an |
|
Tag type identifying an async object owned by an |
|
An AsyncGenerator with a write end |
|
Starts and later joins a dynamic, unbounded set of concurrent tasks. |
|
An |
|
Awaitable that yields the current async stack trace. |
|
The user can use AutoCleanup to wrap arguments passed to a CleanableAsyncGenerator. When the coroutine promise of CleanableAsyncGenerator is created it will automatically attach co_scope_exit task that performs async cleanup for all the arguments wrapped in AutoCleanup. This allows to ensure cleanup of the arguments even when next() of the CleanableAsyncGenerator is never co_awaited. |
|
A task that runs detached in the background; forward‐declared here. |
|
A baton is a synchronisation primitive for coroutines that allows a coroutine to co_await the baton and suspend until the baton is posted by some thread via a call to .post(). |
|
Bounded variant of AsyncPipe which buffers a fixed number of writes before blocking new attempts to write until the buffer is drained. |
|
A coroutine version of bounded queue with given capacity. Both enqueue and dequeue are async awaitable. |
|
A cancellable version of AsyncScope. Work added to this scope will be provided a cancellation token for cancelling during join. |
|
Handles the connect operation for an AsyncSocketTransport. |
|
Extended |
|
CRTP base letting a promise expose a more efficient error‐resumption path. |
|
The awaitable read side of a promise/future contract. |
|
A synchronous coroutine generator that lazily yields a sequence of values. |
|
A mutex that can be locked asynchronously using 'co_await'. |
|
A Rust‐style pollable adaptor over a |
|
A Rust‐style pollable adaptor over an |
|
The write side of a promise/future contract used to fulfill a Future. |
|
Handles data reads for an AsyncTransport. |
|
SerialQueueRunner |
|
A coroutine server socket that accepts connections on the same event base as the underlying socket itself. |
|
This type mirrors the interface of std::shared_lock as much as possible. |
|
The folly::coro::SharedMutexFair class provides a thread synchronisation primitive that allows a coroutine to asynchronously acquire a lock on the mutex. |
|
SharedPromise is a simple wrapper around folly::coro::Promise and folly::coro::Future that allows for fetching cancellable and awaitable futures from a single promise. |
|
Low‐memory unbounded multi‐producer/consumer queue with lower throughput. |
|
Async‐stack‐aware awaitable that reschedules onto an executor. |
|
Async‐stack‐aware awaiter that reschedules its inner awaiter onto an executor. |
|
This class is an adaptation of the folly::Synchronized class but is designed to work with coro‐compatible mutexes like coro::SharedMutexFair instead. |
|
Represents an allocated, but not‐started coroutine, which is not yet been bound to an executor. |
|
Represents an allocated but not yet started coroutine that has already been bound to an executor. |
|
CRTP base implementing the shared behavior of task‐with‐executor wrappers. |
|
CRTP base implementing the shared behavior of task wrappers. |
|
Coroutine transport backed by an AsyncTransport socket. |
|
Common base for all transport callbacks. |
|
Abstract interface for a coroutine‐based socket transport. |
|
Wrapper around folly::UnboundedQueue that supports async dequeue. |
|
An upgradable lock guard held over a coroutine‐aware mutex. |
|
Awaitable that reschedules its inner awaitable onto an executor. |
|
Awaiter that reschedules its inner awaiter onto an executor. |
|
Handles data writes for an AsyncTransport. |
|
Capture wrapper marked |
|
Capture wrapper marked |
|
Heap‐backed |
|
Pointer‐holding |
|
Learn more about |
|
Tag type used by |
|
Metafunction yielding the result type of co_awaiting an Awaitable. |
|
awaiter_type<Awaitable> |
|
Lifetime‐safe wrapper owning a captured value or reference for coroutines. |
|
Lifetime‐safe wrapper owning a captured value or reference for coroutines. |
|
Heap‐backed |
|
Capture over a pointer, adding sugar so |
|
Capture of a cleanup arg, whose refs downgrade dependents to after‐cleanup. |
|
Capture of a cleanup arg, whose refs downgrade dependents to after‐cleanup. |
|
A customization point that allows to provide an async cleanup function for a type. folly::coro::AutoCleanup uses co_cleanup_fn as the default cleanup function, so it is enough to define co_cleanup for a type to be able to use it with AutoCleanup. |
|
Wraps an exception to be thrown from a coroutine via |
|
Function object that invokes a callable and awaits its coroutine result. |
|
Wraps a Try or result to be yielded from a coroutine as its completion. |
|
Wraps a Try or result to be yielded from a coroutine as its completion. |
|
A semi‐awaitable type which, when awaited in an async coroutine supporting safe‐points, causes a safe‐point to be reached. |
|
Tag type that converts to a |
|
Trait detecting whether |
|
is_awaitable<T>::value is_awaitable_v<T> |
|
is_awaiter<T>::value is_awaiter_v<T> |
|
Trait detecting whether T is a semi‐awaitable. |
|
An immovable |
|
The executor‐bound, immovable counterpart of |
|
Primary policy struct: specify behavior for stopped (cancellation) and error. Use via the variable templates below, not directly. |
|
An awaitable that is immediately ready and yields a stored value on resume. |
|
A type trait to unwrap a std::reference_wrapper<T> to a type T |
|
Restricted view on a |
|
Restricted view on a |
|
Proxy granting safe access to an async scope's context. |
|
Why is |
|
A |
|
|
|
An awaitable backed by one of several possible underlying awaitables. |
|
Tag for "terminate on this completion". |
Type Aliases
Name |
Description |
An AsyncGenerator that requires cleanup() to be called before destruction. |
|
Backwards‐compatibility alias for |
|
Backwards‐compatibility alias for |
|
The default SharedMutex is SharedMutexFair. |
|
Coros declared as |
|
Alias for the result type of co_awaiting an Awaitable. |
|
await_result<Awaitable> |
|
Given a cvref‐qualified |
|
A |
|
A |
|
Placeholder type awaited to obtain the current coroutine's cancellation token. |
|
Placeholder type awaited to obtain the current coroutine's executor. |
|
|
Placeholder type awaited to reschedule the current coroutine onto its executor. |
A |
|
Alias for the unwrapped type of remove_reference_wrapper. |
|
The result type of co_awaiting a semi‐awaitable T. |
|
The result type of co_awaiting the Try wrapper of a semi‐awaitable T. |
|
True for awaitables that only complete with value (not stopped or error) |
|
A |
Functions
Name |
Description |
|
|
Creates a lifetime‐safe async closure task from bound args and a coroutine. |
|
Creates an immediately‐awaited async closure returning a |
|
|
|
|
|
Cheaply propagate exceptions from |
|
Creates a scope‐exit coroutine running |
|
Async version of the folly::transition_lock TODO: add more transition policies beyond just from upgrade to exclusive |
|
|
|
|
|
|
|
Concurrently await multiple awaitables and complete with a tuple of results. |
|
|
|
Concurrently await multiple awaitables and complete with a tuple of Try results. |
|
|
|
|
|
|
|
Concurrently await awaitables and complete with the first result and index. |
|
Concurrently await awaitables and return every result once one finishes. |
|
|
|
|
|
Concurrently await awaitables, returning the first success or last error. |
|
|
|
Concatenate the values from multiple streams into a single stream such that each stream is exhausted before the next one begins. |
|
detachOnCancel is used to handle operations that are hard to be cancelled. A typical use case is: The caller starts a task with timeout (in this case, 1 sec timeout). The task itself launches a long running job and the job doesn't handle cancellation (sleep_for in this example). The caller has timeout and the cancellation is propagated to the task. The detachOnCancel detects the cancellation and return immediately. However, the background task still runs until the thread join. |
|
|
Returns whether the compiler converts a coroutine promise return object eagerly. |
Filters a stream, yielding only values that satisfy the predicate. |
|
|
|
Make a Task that will trivially yield an Exception. |
|
|
|
makePromiseContract can help you migrating your non‐coroutine code base to coroutine. If your code already uses Future/SemiFuture, you don't need this tool. A common use case is with async callback functions. In the example, we can pass a callback function into the legacy code sleepAndNotify and sleepAndNotify sets the promise on completion. Consider to use detachOnCancel with this makePromiseContract to handle long running (longer than your timeout) tasks that don't handle cancellation properly. |
|
Make a Task out of a Try. |
|
|
|
|
|
|
|
Make a |
|
|
|
Merges a stream of input streams into a single interleaved output stream. |
|
|
|
Execute a given asynchronous operation returned by func(), retrying it on failure, if desired, after awaiting retryDelay(error). |
|
|
|
Schedules async cleanup for any AutoCleanup arguments on the coroutine. |
|
Return a task that, when awaited, will sleep for the specified duration. |
|
Return a task that, when awaited, will sleep for the specified duration. |
|
Swaps the state of two generators. |
|
|
|
Awaits |
|
Returns a Task that, when started, starts a timer of duration 'timeoutDuration' and awaits the passed SemiAwaitable. |
|
Returns a Task that, when started, starts a timer of duration 'timeoutDuration' and awaits the passed SemiAwaitable (operation). |
|
Converts the given SemiAwaitable to a Future, starting it on the Executor. |
|
Converts the given SemiAwaitable to a SemiFuture (without starting it). |
|
|
|
|
|
|
|
When awaited, returns a |
|
When awaited, returns |
Variables
Name |
Description |
|
Deprecated alias for |
Awaitable yielding the current async stack trace when co_awaited. |
|
Placeholder value awaited to obtain the current coroutine's cancellation token. |
|
Special placeholder object that can be 'co_await'ed from within a Task<T> or an AsyncGenerator<T> to obtain the current folly::Executor associated with the current coroutine. |
|
|
A SemiAwaitable object that allows you to reschedule the current coroutine onto the currently associated executor. |
A semi‐awaitable value that causes a safe‐point to be reached when awaited. |
|
Tag that, when thrown via |
|
True when |
|
|
True if the awaitable customizes the co_withAsyncStack CPO. |
True if T satisfies the awaitable interface. |
|
True if T satisfies the awaiter interface. |
|
True if T is a semi‐awaitable. |
|
Convenience: stopped returns V, error terminates (fatal). |
|
Policy that returns |
|
Convenience for void tasks: stopped returns unit, error terminates. |
|
True if T only completes with a value (not stopped or error). |
|
Policy value selecting termination on a stopped or error completion. |
Using Declarations
Name |
Description |
Re‐exports the standard coroutine handle type. |
|
Re‐exports the standard coroutine traits template. |
|
Re‐exports the standard no‐op coroutine factory. |
|
Re‐exports the standard no‐op coroutine handle type. |
|
Re‐exports the standard no‐op coroutine promise type. |
|
Re‐exports the standard always‐suspend awaitable. |
|
Re‐exports the standard never‐suspend awaitable. |
folly::coro::ext namespace
Tools for library authors who are building new co_cleanup types.
Types
Name |
Description |
Passkey used with |
Enums
Name |
Description |
Selects which reference or pointer form a |
Concepts
Name |
Description |
Satisfied when |
folly::crypto namespace
Cryptographic hashing primitives.
Types
Name |
Description |
An implementation of the BLAKE2x XOF (extendable output function) hash function using BLAKE2b as the underlying hash. This hash function can produce cryptographic hashes of arbitrary length (between 1 and 2ˆ32 ‐ 2 bytes) from inputs of arbitrary size. Like BLAKE2b, it can be keyed, and can accept optional salt and personlization parameters. |
|
Templated homomorphic hash, using LtHash (lattice‐based crypto). Template parameters: B = element size in bits, N = number of elements. |
Type Aliases
Name |
Description |
Fastest and smallest LtHash specialization, with over 200 bits of security. |
|
Higher‐security LtHash specialization; slower and larger than LtHash16_1024. |
|
Higher‐security LtHash specialization; slower and larger than LtHash16_1024. |
Functions
Name |
Description |
Addition operators |
|
Subtraction operators |
folly::detail_tag_invoke_fn namespace
Implementation details of the tag_invoke customization‐point machinery.
Types
Name |
Description |
Defers instantiation of |
|
Empty placeholder type used when no result type is available. |
|
Function object dispatching to an ADL |
Type Aliases
Name |
Description |
The result type of |
Functions
Name |
Description |
Poison‐pill declaration ensuring ADL lookup of |
|
|
folly::dptr_detail namespace
Implementation details.
Types
Name |
Description |
Dispatches a visitor to a const pointer whose type is selected at runtime. |
|
Dispatches a visitor to a pointer whose type is selected at runtime. |
|
Determine the result type of applying a visitor of type V on const pointers of all types in Types..., asserting that the type is the same for all types in Types... |
|
Determine the result type of applying a visitor of type V on pointers of all types in Types..., asserting that the type is the same for all types in Types... |
folly::dynamic_detail namespace
Implementation details for dynamic.
Type Aliases
Name |
Description |
Detects whether a std::string can be constructed from a T's data() and size(). |
folly::dynamicconverter_detail namespace
Implementation details for DynamicConverter and DynamicConstructor.
Types
Name |
Description |
Converts a dynamic iterator's value into a cached, well‐typed value. |
|
An iterator adaptor that dereferences to a converted value of type T::value_type. |
|
Trait determining whether a class with an iterator behaves as a container. |
Type Aliases
Name |
Description |
True when a class type is a container. |
|
Detects whether a type is constructible from its own value_type. |
|
Detects whether a type is dereferenceable and contextually convertible to bool. |
|
Detects a nested iterator member type. |
|
Detects a nested key_type member type. |
|
Detects a nested mapped_type member type. |
|
Detects a nested value_type member type. |
|
True when a type is an associative container with a key_type. |
|
True when a type is a container class. |
|
True when a type behaves like a pointer but is not a string literal. |
|
True when a type is a map‐like container with a mapped_type. |
|
True when a type behaves like an optional value. |
|
True when a type is a range with both value_type and iterator. |
Functions
Name |
Description |
Build a converting iterator over a dynamic iterator. |
folly::exception_tracer namespace
Facilities for capturing and stacking exception stack traces.
Types
Name |
Description |
Information about a captured exception and its stack trace. |
|
A captured stack trace as a fixed‐capacity array of return addresses. |
|
An intrusive stack of captured stack traces. |
Type Aliases
Name |
Description |
Signature of a callback invoked when a catch block begins via __cxa_begin_catch. |
|
Signature of a callback invoked when a catch block ends via __cxa_end_catch. |
|
Signature of a callback invoked when an exception is rethrown via __cxa_rethrow. |
|
Signature of a callback invoked when an exception is thrown via __cxa_throw. |
|
Signature of a callback invoked when an exception is rethrown via std::rethrow_exception. |
Functions
Name |
Description |
Register a callback invoked on each __cxa_begin_catch. |
|
Register a callback invoked on each __cxa_end_catch. |
|
Register a callback invoked on each __cxa_rethrow. |
|
Register a callback invoked on each __cxa_throw. |
|
Register a callback invoked on each std::rethrow_exception. |
|
Unregister a previously registered __cxa_begin_catch callback. |
|
Unregister a previously registered __cxa_end_catch callback. |
|
Unregister a previously registered __cxa_rethrow callback. |
|
Unregister a previously registered __cxa_throw callback. |
|
Unregister a previously registered std::rethrow_exception callback. |
Variables
Name |
Description |
Maximum number of frames captured in a single stack trace. |
folly::expected_detail namespace
Implementation details for folly::Expected.
Namespaces
Name |
Description |
Implementation details for the ExpectedHelper continuation machinery. |
Types
Name |
Description |
Mixin that adds a copy assignment which delegates to the derived assign. |
|
Mixin that adds a copy constructor which delegates to the derived assign. |
|
Tag type selecting the empty‐state constructor. |
|
Tag type selecting the error‐state constructor. |
|
Awaitable that unwraps an Expected inside a coroutine. |
|
Storage backing an Expected, holding either a value or an error. |
|
Raw union of a value and an error with a discriminator. |
|
Mixin that adds a move assignment which delegates to the derived assign. |
|
Mixin that adds a move constructor which delegates to the derived assign. |
|
Selects the appropriate coroutine promise for a value and error type. |
|
Shared base of the Expected coroutine promise types. |
|
Coroutine return object that materializes an Expected from a promise. |
|
Coroutine promise for coroutines that produce a value. |
|
Coroutine promise for coroutines with no meaningful return value. |
|
Awaitable that short‐circuits a coroutine with an unexpected error. |
|
Tag type used to disambiguate error‐state construction of Expected. |
|
Tag type selecting the value‐state constructor. |
Type Aliases
Name |
Description |
True when |
|
True when |
|
True when |
|
True when |
|
True when |
|
True when |
Enums
Name |
Description |
Storage strategy chosen for an Expected's value and error. |
|
Discriminator for which alternative an Expected currently holds. |
Functions
Name |
Description |
|
|
Selects the storage strategy for a given value and error type. |
Variables
Name |
Description |
True when a coroutine over |
Using Declarations
Name |
Description |
Introduces ExpectedHelper into the expected_detail namespace. |
folly::expected_detail::expected_detail_ExpectedHelper namespace
Implementation details for the ExpectedHelper continuation machinery.
Types
Name |
Description |
Static helpers implementing the Expected continuation operations. |
Functions
Name |
Description |
Comma operator that lets Expected::then handle lambdas returning void. |
folly::experimental namespace
Namespace for experimental Folly components.
Types
Name |
Description |
Class to model the process environment in idiomatic C++ |
|
Exception thrown when the process environment cannot be modeled. |
folly::ext namespace
Extension namespace for library authors, a public analog of folly::detail.
Types
Name |
Description |
Passkey that gates the reconstruction ctor used by |
|
Mover returned from |
|
Default impl of |
|
ext::format_string_and_location |
|
CRTP base that makes a derived type must‐use‐immediately and immovable. |
|
Passkey for the static |
|
Wrap a movable |
Type Aliases
Name |
Description |
Trait giving |
|
Signature of a function that resolves a test resource path by name. |
Functions
Name |
Description |
|
Build a |
|
Obtain a mover that destructively moves |
Variables
Name |
Description |
|
|
Overridable hook used by tests to locate resource files. |
Concepts
Name |
Description |
Satisfied when |
folly::external namespace
Vendored third‐party code adapted for use in Folly.
Namespaces
Name |
Description |
FarmHash family of hash and fingerprint functions. |
|
Implementation details of the rapidhash hashing algorithm. |
Functions
Name |
Description |
rapidhash general purpose hash function. |
|
rapidhashMicro hash function. |
|
rapidhashMicro seeded hash function. |
|
rapidhashNano hash function. |
|
rapidhashNano seeded hash function. |
|
rapidhash seeded hash function. |
folly::external::farmhash namespace
FarmHash family of hash and fingerprint functions.
Namespaces
Name |
Description |
FarmHash "cc" variant, derived from CityHash. |
|
FarmHash "mk" variant. |
|
FarmHash "na" variant. |
|
FarmHash "nt" variant. |
|
FarmHash "sa" variant. |
|
FarmHash "su" variant. |
|
FarmHash "te" variant. |
|
FarmHash "uo" variant. |
|
FarmHash "xo" variant. |
|
/ internal variants |
Type Aliases
Name |
Description |
Unsigned 128‐bit integer type used for 128‐bit hashes. |
Functions
Name |
Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Hashes 128 input bits down to 64 bits of output. |
|
|
|
|
|
|
|
|
|
|
|
Builds a 128‐bit value from its low and high 64‐bit halves. |
|
Returns the high 64 bits of a 128‐bit value. |
|
Returns the low 64 bits of a 128‐bit value. |
folly::external::farmhash::farmhashcc namespace
FarmHash "cc" variant, derived from CityHash.
Functions
Name |
Description |
Hashes a byte array to a 128‐bit value using CityHash, mixing in a 128‐bit seed. |
|
Fingerprints a byte array to a 128‐bit value. |
|
Fingerprints a byte array to a 32‐bit value. |
|
Fingerprints a byte array to a 64‐bit value. |
|
Hashes a byte array to a size_t value. |
|
Hashes a byte array to a 128‐bit value. |
|
Hashes a byte array to a 128‐bit value, mixing in a 128‐bit seed. |
|
Hashes a byte array to a 32‐bit value. |
|
Hashes a byte array to a 32‐bit value, mixing in a 32‐bit seed. |
|
Hashes a byte array to a 64‐bit value. |
|
Hashes a byte array to a 64‐bit value, mixing in a 64‐bit seed. |
|
Hashes a byte array to a 64‐bit value, mixing in two 64‐bit seeds. |
folly::external::farmhash::farmhashmk namespace
FarmHash "mk" variant.
Functions
Name |
Description |
Hashes a byte array to a 32‐bit value. |
|
Hashes a byte array to a 32‐bit value, mixing in a 32‐bit seed. |
folly::external::farmhash::farmhashna namespace
FarmHash "na" variant.
Functions
Name |
Description |
Hashes a byte array to a 64‐bit value. |
|
Hashes a byte array to a 64‐bit value, mixing in a 64‐bit seed. |
|
Hashes a byte array to a 64‐bit value, mixing in two 64‐bit seeds. |
folly::external::farmhash::farmhashnt namespace
FarmHash "nt" variant.
Functions
Name |
Description |
Hashes a byte array to a 32‐bit value. |
|
Hashes a byte array to a 32‐bit value, mixing in a 32‐bit seed. |
folly::external::farmhash::farmhashsa namespace
FarmHash "sa" variant.
Functions
Name |
Description |
Hashes a byte array to a 32‐bit value. |
|
Hashes a byte array to a 32‐bit value, mixing in a 32‐bit seed. |
folly::external::farmhash::farmhashsu namespace
FarmHash "su" variant.
Functions
Name |
Description |
Hashes a byte array to a 32‐bit value. |
|
Hashes a byte array to a 32‐bit value, mixing in a 32‐bit seed. |
folly::external::farmhash::farmhashte namespace
FarmHash "te" variant.
Functions
Name |
Description |
Hashes a byte array to a 64‐bit value. |
|
Hashes a byte array to a 64‐bit value, mixing in a 64‐bit seed. |
|
Hashes a byte array to a 64‐bit value, mixing in two 64‐bit seeds. |
folly::external::farmhash::farmhashuo namespace
FarmHash "uo" variant.
Functions
Name |
Description |
Hashes a byte array to a 64‐bit value. |
|
Hashes a byte array to a 64‐bit value, mixing in a 64‐bit seed. |
folly::external::farmhash::farmhashxo namespace
FarmHash "xo" variant.
Functions
Name |
Description |
Hashes a byte array to a 64‐bit value. |
|
Hashes a byte array to a 64‐bit value, mixing in a 64‐bit seed. |
|
Hashes a byte array to a 64‐bit value, mixing in two 64‐bit seeds. |
folly::external::farmhash::test namespace
/ internal variants
Variables
Name |
Description |
When set, hash functions return zero if the build is misconfigured. |
folly::external::rapidhash_detail namespace
Implementation details of the rapidhash hashing algorithm.
Functions
Name |
Description |
rapidhashMicro main function. |
|
rapidhashNano main function. |
|
rapidhash main function. |
|
Multiply and xor mix function. |
|
64*64 ‐> 128‐bit multiply function. |
|
Reads a 32‐bit value from an unaligned buffer. |
|
Reads a 64‐bit value from an unaligned buffer. |
Variables
Name |
Description |
Default secret parameters used to alter the hash result. |
folly::f14 namespace
Implementation details for the F14 hash table family.
Namespaces
Name |
Description |
Test‐only helpers for F14 containers. |
Type Aliases
Name |
Description |
Default allocator for F14 container elements of type |
|
Default hasher for F14 containers keyed on |
|
Default key‐equality comparator for F14 containers keyed on |
folly::f14::test namespace
Test‐only helpers for F14 containers.
Functions
Name |
Description |
Disables the randomized insertion ordering used in sanitizer and debug builds. |
folly::fallback namespace
A fallback implementation used when the standard trait is unavailable.
Types
Name |
Description |
A trait type that is true when From is nothrow‐convertible to To. |
Variables
Name |
Description |
A trait variable that is true when From is nothrow‐convertible to To. |
folly::fbstring_detail namespace
Implementation details for fbstring.
Functions
Name |
Description |
Copies |
|
Copies a range of POD elements to a non‐overlapping destination. |
|
Fills a range of POD elements with a given value. |
|
Moves a range of POD elements to a possibly overlapping destination. |
folly::fibers namespace
Lightweight cooperative userspace threads (fibers) and related primitives.
Namespaces
Name |
Description |
Async/await‐style API for running fiber tasks. |
Types
Name |
Description |
An exception class that gets set on the promise for dispatched tokens, when the AtomicBatchDispatcher was destroyed before commit was called on it. |
|
An exception class that gets set on the promise for dispatched tokens, when one or more other tokens in the batch were destroyed before dispatch was called on them. Only here so that the caller can distinguish the real failure cause rather than these subsequently thrown exceptions. |
|
An exception class that gets thrown when the AtomicBatchDispatcher is used incorrectly. This is indicative of a bug in the user code. Examples are, multiple dispatch calls on the same token, trying to get more tokens from the dispatcher after commit has been called, etc. |
|
AtomicBatchDispatcher should be used if you want to process fiber tasks in parallel, but require to synchronize them at some point. The canonical example is to create a database transaction dispatch round. This API notably enforces that all tasks in the batch have reached the synchronization point before the user provided dispatch function is called with all the inputs provided in one function call. It also provides a guarantee that the inputs in the vector of inputs passed to the user provided dispatch function will be in the same order as the order in which the token for the job was issued. |
|
BatchDispatcher is useful for batching values while doing I/O. For example, if you are launching multiple tasks which take a single id and each task fetches from database, you can use BatchDispatcher to batch those ids and do a single query requesting all those ids. |
|
Fiber‐compatible batch semaphore with ability to perform batch token increment/decrement. Will safely block fibers that wait when no tokens are available and wake fibers when signalled. |
|
Primitive which allows one to put current Fiber to sleep and wake it from another Fiber/thread. |
|
A LoopController that drives a FiberManager loop from a folly EventBase. |
|
Interface for LoopController with publicly acessible executor |
|
A fiber loop controller that works for arbitrary folly::Executor |
|
A TimeoutManager that schedules timeouts on a folly::Executor. |
|
Fiber object used by FiberManager to execute tasks. |
|
Low‐level fiber wrapper over Boost.Context that switches execution contexts. |
|
Single‐threaded task execution engine. |
|
Trait that yields the type of the first argument of a callable |
|
Stack allocator that protects an extra memory page after the end of the stack. Will only add extra memory pages up to a certain number of allocations to avoid creating too many memory maps for the process. |
|
Interface driving the loop that runs a FiberManager's ready fibers. |
|
Fiber‐compatible semaphore. Will safely block fibers that wait when no tokens are available and wake fibers when signalled. |
|
Fiber‐compatible semaphore base. Will safely block fibers that wait when no tokens are available and wake fibers when signalled. |
|
A LoopController that drives a FiberManager loop inline, mainly for tests. |
|
Caches fiber stacks with guard pages for reuse across allocations. |
|
Traverses tasks scheduled by addTasks in the order they complete. |
|
Options controlling how a fiber task is executed. |
|
Like mutex but allows timed_lock in addition to lock and try_lock. |
|
A readers‐writer lock which allows multiple readers to hold the lock simultaneously or only one writer. |
Type Aliases
Name |
Description |
Alias for the fiber‐compatible |
|
A timed readers‐writer mutex, defaulting to reader priority. |
|
A reader‐preferred timed readers‐writer mutex. |
|
A writer‐preferred timed readers‐writer mutex. |
|
Fiber‐compatible once flag backed by a |
Functions
Name |
Description |
|
|
|
|
|
|
|
|
Creates an AtomicBatchDispatcher that uses the given dispatch function. |
|
Schedules several tasks and blocks until all of them are completed. In the process of their successful completion given callback would be called for each of them with the index of the task and the result it returned (if not void). If any of these n tasks throws an exception, this exception will be re‐thrown, but only when all tasks are complete. If several tasks throw exceptions one of them will be re‐thrown. Callback won't be called for tasks that throw exception. |
|
Returns the fiber manager keyed by the local type |
|
Unconditionally install the SIGSEGV handler that detects fiber stack overflow. Can be useful if the handler has been overridden by some other code overriding the SIGSEGV handler |
folly::fibers::async namespace
Async/await‐style API for running fiber tasks.
Types
Name |
Description |
Asynchronous fiber result wrapper |
|
Trait that extracts the inner value type wrapped by an Async type. |
|
Callable type that awaits an Async wrapper via tag_invoke. |
Type Aliases
Name |
Description |
Inner value type wrapped by the Async type |
|
Maps the Async result of invoking |
|
Inner value type produced by invoking |
Functions
Name |
Description |
Schedule an async‐annotated functor to run on a fiber manager. |
|
Schedule an async‐annotated functor to run on a fiber manager. Returns a Future for the result. |
|
Schedule an async‐annotated functor to run on a remote thread's fiber manager. |
|
Schedule an async‐annotated functor to run on a remote thread's fiber manager. Returns a future for the result. |
|
Await an async‐annotated functor, capturing its result or exception in a Try. |
|
Async tagged wrapper that waits on a baton for a bounded duration. |
|
Async tagged wrapper that waits on a baton until a deadline. |
|
Async tagged wrapper that blocks on a baton until it is posted. |
|
|
|
|
|
Run an async‐annotated functor on a new fiber, blocking the current fiber. |
|
Run an async‐annotated functor on a new fiber on remote thread, blocking the current fiber. |
|
Run an async‐annotated functor |
|
Executes |
|
Convert a Try into an Async result, rethrowing any stored exception. |
|
|
|
|
|
Async annotated wrapper around fibers::await |
|
Connects the execution of synchronous function |
|
|
|
|
Variables
Name |
Description |
True when |
folly::fileops namespace
folly::fileutil_detail namespace
Implementation details.
Functions
Name |
Description |
Returns a string compatible for mkstemp(). |
|
|
|
Wrap call to read/pread/write/pwrite(fd, buf, count, offset?) to retry on incomplete reads / writes. The variadic argument magic is there to support an additional argument (offset) for pread / pwrite; see the incr() functions above which do nothing if the offset is not present and increment it if it is. |
|
Wrap call to f(args) in loop to retry on EINTR. |
|
Retry reading/writing iovec objects. |
folly::find_fixed_detail namespace
Implementation details for folly::findFixed.
Functions
Name |
Description |
Searches 16 bytes for a value using a SIMD register. |
|
Searches a fixed‐size range using two overlapping SIMD registers. |
|
Searches 32 bytes for a value using a SIMD register. |
|
Searches 8 bytes for a value using a SIMD register. |
|
Searches a range for a value with a constexpr‐friendly scalar loop. |
|
Dispatches a fixed‐size search to the best strategy for the range size. |
|
Searches a fixed‐size range with a plain scalar loop the compiler can unroll. |
|
Searches a fixed‐size range by splitting off a leading SIMD register. |
|
Returns the index of the first set element in a SIMD comparison register. |
Variables
Name |
folly::for_each_detail namespace
The user should return loop_break and loop_continue if they want to iterate in such a way that they can preemptively stop the loop and break out when certain conditions are met.
Enums
Name |
Description |
Signals whether a for_each callback wants to stop or keep iterating. |
folly::format_value namespace
Utilities for all format value specializations.
Functions
Name |
Description |
Format a Formatter object recursively. Behaves just like formatString(fmt.str(), arg, cb); but avoids creating a temporary string if possible. |
|
Format a number in "val"; the first prefixLen characters form the prefix (sign, "0x" base prefix, etc) which must be left‐aligned if the alignment is Align::PAD_AFTER_SIGN. Treats Align::DEFAULT as Align::LEFT. Ignores arg.precision, as that has a different meaning for numbers (not "maximum field width") |
|
Format a string in "val", obeying appropriate alignment, padding, width, and precision. Treats Align::DEFAULT as Align::LEFT, and Align::PAD_AFTER_SIGN as Align::RIGHT; use formatNumber for number‐specific formatting. |
folly::fs namespace
Portable filesystem imports selecting the available <filesystem> backend.
Namespace Aliases
Name |
Description |
Alias for the selected standard filesystem namespace. |
Types
Name |
Description |
Function object that generates a unique path from a model. |
Type Aliases
Name |
Description |
Callable type that generates a unique path from a model. |
Enums
Name |
Description |
Identifies which standard filesystem implementation is in use. |
Functions
Name |
Description |
Canonicalize the parent path, leaving the filename (last component) unchanged. You may use this before creating a file instead of boost::filesystem::canonical, which requires that the entire path exists. |
|
Get the path to the current executable. |
|
Returns the lexically normal form of the given path. |
|
If "path" starts with "prefix", return "path" with "prefix" removed. Otherwise, throw filesystem_error. |
|
Check whether "path" starts with "prefix". That is, if prefix has n path elements, then the first n elements of path must be the same as prefix. |
Variables
Name |
Description |
Callable that generates a unique path from a model. |
|
The filesystem implementation selected at compile time. |
Using Declarations
Name |
Description |
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
|
Imported |
folly::futures namespace
Futures‐based asynchronous programming primitives.
Types
Name |
Description |
A folly::Future‐istic Barrier synchronization primitive. |
Functions
Name |
Description |
Retries a future‐factory according to a policy, returning a SemiFuture. |
|
Builds a retry policy that retries until a maximum number of attempts. |
|
|
|
retrying and retryingUnsafe |
folly::gen namespace
Lazy sequence generators and pipeline operators.
Types
Name |
Description |
Function object that constructs a |
|
Function object that calls a const member function of a class. |
|
These exist because MSVC has problems with expression SFINAE in templates assignment and comparisons don't work properly without being pulled out of the template declaration |
|
SFINAE helper exposing whether |
|
Function object that accesses a data member of a class. |
|
CRTP base for sequence generators that yield |
|
Function object that extracts the nth element of a tuple‐like value. |
|
Function object that compares two values with |
|
Groups the values of a sequence by a computed key. |
|
Function object that compares two values with |
|
Function object that calls a non‐const member function of a class. |
|
EOL terms ("r", "n", or "rn"). |
|
Function object that casts its argument to an rvalue reference. |
|
Class and helper function for negating a boolean Predicate |
|
CRTP base for pipeline operators applied to generators. |
|
Outputs exactly the same bytes as the input stream, in different chunks. A chunk boundary occurs after each delimiter, or, if maxLength is non‐zero, after maxLength bytes, whichever comes first. Your callback can return false to stop consuming the stream at any time. |
|
Function object that converts values to |
|
Function object that converts values to |
|
Polymorphic wrapper |
|
Move‐only polymorphic wrapper for a generator yielding |
Enums
Name |
Description |
Selects the const or non‐const overload of a member accessor. |
Functions
Name |
Description |
all() ‐ For determining whether all values in a sequence satisfy a predicate. |
|
any() ‐ For determining if any value in a sequence satisfies a predicate. |
|
Appends each value of a sequence to an existing collection. |
|
|
|
Asserts at compile time that the sequence yields the given value type. |
|
Generates the lines of an input stream, one std::string at a time. |
|
|
|
Determines whether a sequence contains a given value. |
|
Keeps only the first value for each distinct selected key. |
|
Constructs a |
|
Calls folly::to on each value, converting it to |
|
|
|
|
|
Calls folly::tryTo on each value, mapping to an Expected of |
|
Produces an empty sequence of the given value type. |
|
Extracts a data member from each value. |
|
Keeps only values that satisfy the predicate. |
|
Left‐folds a sequence into a single value from an initial seed. |
|
|
|
Produces a sequence referencing the elements of a const container. |
|
Produces a sequence holding copies of the elements of a container. |
|
|
|
Wraps a source callable as a generator yielding |
|
Extracts the nth element of each tuple‐like value. |
|
Groups all values by their selected key. |
|
Groups consecutive values that share the same selected key. |
|
Wraps a pipeline so exceptions of a given type are passed to a handler. |
|
Interleaves values from the source pipeline with those from |
|
Produces a sequence containing a single value. |
|
Split by EOL ("r", "n", or "rn"). |
|
Applies a function to each value, yielding the results. |
|
mapOp ‐ Given a generator of generators, maps the application of the given operator on to each inner gen. Especially useful in aggregating nested data structures: |
|
Applies a function to each value, yielding the results. |
|
Finds the value with the maximum selected key. |
|
|
|
Finds the value with the minimum selected key. |
|
Creates a predicate that negates the result of |
|
Orders values by their selected key using the given comparer. |
|
Orders values in descending order of their selected key. |
|
parallel ‐ A parallelization operator. |
|
Run |
|
|
|
Reduces a sequence to a single value using a binary reducer. |
|
Split the output from a generator into StringPiece "lines" delimited by the given delimiter. Delimters are NOT included in the output. |
|
|
|
|
|
Creates a StreamSplitter, deducing the callback type. |
|
sub ‐ For sub‐summarization of a sequence. |
|
Yields values while the predicate holds, then stops. |
|
|
|
|
|
Yields values until the predicate holds, then stops. |
|
Unwraps an optional‐like value, using a fallback when it is empty. |
|
Applies a visitor to each value, passing values through unchanged. |
folly::gflags namespace
Minimal stand‐in for the gflags namespace when gflags is unavailable.
Types
Name |
Description |
No‐op replacement for the gflags command‐line flag saver. |
Functions
Name |
Description |
Stub that ignores an attempt to set a command‐line flag. |
folly::hash namespace
Hashing algorithms and helpers.
Namespaces
Name |
Description |
FarmHash hashing and fingerprinting functions imported from the bundled external implementation. |
Types
Name |
Description |
SpookyHash V1: a 128‐bit noncryptographic hash function by Bob Jenkins. |
|
SpookyHash V2: a 128‐bit noncryptographic hash function by Bob Jenkins. |
|
Hasher that forwards to std::hash for each key type. |
Functions
Name |
Description |
Order‐independent reduction of two 64‐bit hashes into one. |
|
Combine hashes of multiple items, order‐independently. |
|
Combine hashes of multiple items, order‐independently. |
|
Create a hash from multiple hashable objects, order‐independently. |
|
|
Create a hash from multiple hashable objects, order‐independently. |
|
Hash a value, and combine it with a seed. Commutative. |
Alias for fnv32_BROKEN. |
|
|
|
|
|
Alias for fnv32_append_byte_BROKEN. |
|
Append byte to FNV hash. |
|
Append byte to FNV hash. |
|
|
|
|
|
|
|
Alias for fnv64_BROKEN. |
|
|
|
|
|
Alias for fnv64_append_byte_BROKEN. |
|
Append a byte to FNV hash. |
|
Append a byte to FNV hash. |
|
|
|
|
|
|
|
FNVA hash of a string. |
|
Append a byte to FNVA hash. |
|
|
|
FNVA hash of a string. |
|
Append a byte to FNVA hash. |
|
|
|
Reduce two 64‐bit hashes into one. |
|
Combine hashes of multiple items, order‐dependently. |
|
|
|
Combine hashes of items in the range [first, last), order‐dependently.] |
|
hsieh hash a c‐str. |
|
hsieh hash a void* byte‐range. |
|
hsieh hash a byte‐range. |
|
hsieh hash a string. |
|
Robert Jenkins' reversible 32 bit mix hash function. |
|
Inverse of jenkins_rev_mix32. |
|
Low‐bias 32 bit mix function. |
|
Inverse of lowbias_mix32. |
|
Pelle Evensen's moremur 64 bit mix function. |
|
Inverse of moremur_mix64. |
|
Implementation of MurmurHash2 hashing algorithm for 64‐bit platforms. |
|
Hash a string view compatibly with std::hash, using a faster murmur‐based hash where available. |
|
Thomas Wang downscaling hash function. |
|
Thomas Wang 64 bit mix hash function. |
|
Inverse of twang_mix64. |
Variables
Name |
Description |
FNV‐1 32‐bit offset‐basis seed, the starting value for 32‐bit FNV hashing. |
|
FNV‐1 64‐bit offset‐basis seed, the starting value for 64‐bit FNV hashing. |
|
FNV‐1a 32‐bit offset‐basis seed, the starting value for 32‐bit FNV‐1a hashing. |
|
FNV‐1a 64‐bit offset‐basis seed, the starting value for 64‐bit FNV‐1a hashing. |
Using Declarations
Name |
Description |
Hash a byte buffer with rapidhash, |
|
Hash a byte buffer with the rapidhashMicro variant, |
|
Hash a byte buffer with rapidhashMicro and an explicit seed, |
|
Hash a byte buffer with the rapidhashNano variant, |
|
Hash a byte buffer with rapidhashNano and an explicit seed, |
|
Hash a byte buffer with rapidhash and an explicit seed, |
folly::hash::farmhash namespace
FarmHash hashing and fingerprinting functions imported from the bundled external implementation.
Using Declarations
Name |
Description |
Fingerprint a byte buffer to a stable 32‐bit value, |
|
Fingerprint a byte buffer to a stable 64‐bit value, |
|
Hash a byte buffer to a |
|
Hash a byte buffer to a 32‐bit value, |
|
Hash a byte buffer to a 64‐bit value, |
folly::invoke_detail namespace
Implementation details of the folly invocation traits.
Types
Name |
Description |
Tests return‐type convertibility, specialized on whether the target is void. |
|
Holds the result type of invoking |
|
Quoted metafunction enforcing that a type is complete, cv‐void, or unbounded‐array. |
|
Invocation traits for a callable type |
|
Invocation traits for a pointer‐to‐member |
Type Aliases
Name |
Description |
The result type of invoking |
|
Bool constant that is true when invoking |
|
Yields |
Variables
Name |
Description |
True if |
|
True if invoking |
|
Specialization testing return‐type convertibility when the invocation is well‐formed. |
|
True if |
|
Specialization yielding true when the invocation is well‐formed. |
|
True if a nothrow invocation of |
|
Specialization testing nothrow invocation and return convertibility when well‐formed. |
|
True if |
|
Specialization yielding the nothrow result when the invocation is well‐formed. |
folly::io namespace
Cursor and queue utilities for reading and writing IOBuf chains.
Types
Name |
Description |
Append to the end of a buffer chain, growing the chain (by allocating new buffers) in increments of at least growth bytes every time. Won't grow (and push() and ensure() will throw) if growth == 0. |
|
Read‐only cursor over an IOBuf chain. |
|
Base class implementing the shared cursor logic over an IOBuf chain. |
|
Appender that writes to the end of an IOBufQueue. |
|
Read‐write cursor over an IOBuf chain. |
|
A register‐pass facade for a Cursor over an IOBuf chain. |
|
Mixin providing write operations for cursor types. |
Type Aliases
Name |
Description |
Read‐write cursor that assumes private access to the IOBuf chain. |
|
Read‐write cursor that unshares (copy‐on‐write) buffers before writing. |
Enums
Name |
Description |
Whether a clone may point at buffers that IOBuf does not own. |
|
Selects whether a read‐write cursor unshares buffers before writing. |
folly::json namespace
JSON parsing and serialization utilities.
Types
Name |
Description |
Error thrown when deserializing json (i.e. converting a string into json). |
|
Source location of a parsed value (may be extended in the future to include offset, column, etc.). |
|
Parse metadata describing where a value's key and value appear in the source text. |
|
Source range of a parsed value (may be extended in the future to include an end location). |
|
Error thrown when serializing json (i.e. converting json into a string). |
|
Options controlling how a dynamic is serialized to and parsed from JSON. |
Type Aliases
Name |
Description |
Maps each parsed dynamic to its parse metadata. |
Enums
Name |
Description |
Specifies how to format floating‐point values in serialized JSON output. |
Functions
Name |
Description |
Create bitmap for serialization_opts.extra_ascii_to_escape_bitmap. |
|
Escape a string so that it is legal to print it in JSON text. |
|
Serialize dynamic to json‐string, with options. |
|
Strip all C99‐like comments (i.e. // and / * ... * /) |
folly::jsonschema namespace
JSON Schema (draft v4) validation utilities.
Types
Name |
Description |
Interface for a schema validator. |
Functions
Name |
Description |
Makes a validator for schemas. You should probably check your schema with this before you use makeValidator(). |
|
Make a validator that can be used to check various json. Thread‐safe. |
folly::libcpp_detail namespace
Implementation details for libc++ bitset support.
Types
Name |
Description |
Memory layout mirroring libc++'s |
Functions
Name |
Description |
Return the content of the 64‐bit word, given an index. |
|
Return the index of the first set bit in a bitset at or after an index. |
folly::logging namespace
Folly's logging library.
Types
Name |
Description |
Class to bridge GLOG to folly logging. |
|
Rate limiter allowing up to N events per fixed window of M milliseconds. |
Functions
Name |
Description |
Append raw information about an object to a string. |
|
|
|
Convert an arbitrary object to a string for logging purposes. |
folly::memory namespace
Memory management utilities.
Functions
Name |
Description |
Builds an IOBuf factory backed by the given singleton allocator. |
Concepts
Name |
Description |
Requirements for a singleton allocator usable with an IOBuf arena factory. |
folly::moveonly_ namespace
Internal namespace hosting the copy/move control base types.
Types
Name |
Description |
Empty base that permits both copy and move. |
|
Disallow copy but not move in derived types. This is essentially boost::noncopyable (the implementation is almost identical), except: 1) It doesn't delete move constructor and move assignment. 2) It has public methods, enabling aggregate initialization. |
|
Disallow copy and move for derived types. This is essentially boost::noncopyable (the implementation is almost identical), except it has public methods, enabling aggregate initialization. |
Type Aliases
Name |
Description |
Base type selecting copy/move capabilities from the given flags. |
folly::netops namespace
Cross‐platform socket operation wrappers.
Types
Name |
Description |
Dispatcher for netops:: calls. |
|
Container for netops::Dispatcher. |
|
A msghdr/WSAMSG struct wrapper for cross‐platform use. |
|
Poll descriptor is intended to be byte‐for‐byte identical to pollfd, except that it is typed as containing a NetworkSocket for sane interactions. |
|
Functions
Name |
Description |
Accepts a connection on a listening socket. |
|
Binds a socket to a local address. |
|
Closes a socket. |
|
Connects a socket to a remote address. |
|
Retrieves the address of the connected peer. |
|
Retrieves the local address bound to a socket. |
|
Retrieves a socket option. |
|
Converts an IPv4 dotted‐decimal string to a network address. |
|
Marks a socket as accepting connections. |
|
Waits for events on a set of poll descriptors. |
|
Receives data from a connected socket. |
|
Receives data and records the source address. |
|
Receives multiple messages in a single call. |
|
Receives a message, including ancillary data. |
|
Sends data on a connected socket. |
|
Sends multiple messages in a single call. |
|
Sends a message, including ancillary data. |
|
Sends data to a specific destination address. |
|
Puts a socket into blocking mode. |
|
Sets the close‐on‐exec flag on a socket. |
|
Puts a socket into non‐blocking mode. |
|
Sets a socket option. |
|
Shuts down part or all of a full‐duplex connection. |
|
Creates a socket. |
|
Creates a connected pair of sockets. |
folly::numbers namespace
numbers
Variables
Name |
Description |
e |
|
e_v |
|
ln2 |
|
ln2_v |
folly::observer namespace
Folly's observer library.
Types
Name |
Description |
An AtomicObserver provides read‐optimized caching for an Observer using |
|
Owns a callback subscription to an Observer. |
|
A read‐optimized observer that caches an observer's snapshot with core‐local sharing. |
|
HazptrObserver implements a read‐optimized Observer which caches an Observer's snapshot and protects access to it using hazptrs. The cached snapshot is kept up to date using a callback which fires when the original observer changes. This implementation incurs an additional allocation on updates making it less suitable for write‐heavy workloads. |
|
Default traits describing how to read from and subscribe to an observable. |
|
Observer ‐ a library which lets you create objects which track updates of their dependencies and get re‐computed when any of the dependencies changes. |
|
Creates an |
|
Maps a value type to the observer type used to cache it. |
|
A ReadMostlyAtomicObserver guarantees that reading is exactly one relaxed atomic load and a read from a thread local bool. Like AtomicObserver, the value is cached using |
|
A TLObserver that optimizes for getting a shared_ptr‐like pointer to data. |
|
An observable whose value is set manually and read through an |
|
A stable view of an observed value at a point in time. |
|
A TLObserver provides read‐optimized caching for an Observer using thread‐local storage. This avoids creating a shared_ptr for every read. |
Type Aliases
Name |
Description |
Alias for the observer type selected by ObserverTraits. |
Functions
Name |
Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The returned Observer will proxy updates from the input observer but will delay the propagation of each update by some duration between 0 ms and lag + jitter. In addition, if an update arrives while no preceding jittered updates are still in flight, then the delay applied to the latest update will be a uniformly random duration between lag ‐ jitter and lag + jitter. |
folly::observer_detail namespace
Implementation details.
Types
Name |
Description |
Core stores the current version of the object held by Observer. It also keeps all dependencies and dependents of the Observer. |
|
Tracks directed edges and rejects any that would introduce a cycle. |
|
Yields the decayed type unless |
|
Yields the decayed type unless |
|
Removes an |
|
Extracts the value type from an |
|
Extracts the element type from a |
Type Aliases
Name |
Description |
The result of invoking |
|
The result of invoking |
|
The |
|
The |
folly::padded namespace
Utilities for storing data aligned on block (possibly cache‐line) boundaries, with optional padding.
Types
Name |
Description |
Adaptor around a STL sequence container. |
|
Wrapper around iterators to Node to return iterators to the underlying node elements. |
|
A Node is a fixed‐size container of as many objects of type T as would fit in a region of memory of size NS. The last NS % sizeof(T) bytes are ignored and uninitialized. |
Functions
Name |
Description |
|
|
Given a container to Node, return iterators to the first element in the first Node / one past the last element in the last Node. Note that the last node is assumed to be full; if that's not the case, subtract from end() as appropriate. |
|
Returns a const element iterator one past the last element in the last Node. |
|
|
folly::pmr namespace
Aliases that use a polymorphic allocator.
Type Aliases
Name |
Description |
F14FastMap specialized to use a std::pmr polymorphic allocator. |
|
F14FastSet specialized to use a std::pmr polymorphic allocator. |
|
F14NodeMap specialized to use a std::pmr polymorphic allocator. |
|
F14NodeSet specialized to use a std::pmr polymorphic allocator. |
|
F14ValueMap specialized to use a std::pmr polymorphic allocator. |
|
F14ValueSet specialized to use a std::pmr polymorphic allocator. |
|
F14VectorMap specialized to use a std::pmr polymorphic allocator. |
|
F14VectorSet specialized to use a std::pmr polymorphic allocator. |
|
A heap_vector_map that uses a polymorphic allocator. |
|
A heap_vector_set that uses a polymorphic allocator. |
|
A sorted_vector_map that uses a polymorphic allocator. |
|
A sorted_vector_set that uses a polymorphic allocator. |
|
Alias for |
folly::poly namespace
Interfaces and helpers for the Poly type‐erasure utility.
Types
Name |
Description |
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
Functions
Name |
Description |
Tests whether a |
|
Tests whether a |
folly::portability namespace
Portability shims for platform‐specific system interfaces.
Namespaces
Name |
Description |
Portable wrappers and imports for BSD socket functions. |
|
Portable wrappers and imports for C standard library routines. |
Functions
Name |
Description |
Returns the directory portion of a path, without modifying the input. |
folly::portability::sockets namespace
Portable wrappers and imports for BSD socket functions.
Using Declarations
Name |
Description |
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
|
Imported global |
folly::portability::stdlib namespace
Portable wrappers and imports for C standard library routines.
folly::recordio_helpers namespace
Low‐level helpers exposing the RecordIO record format.
Types
Name |
Description |
A record and the file id it was written with. |
Functions
Name |
Description |
|
|
Header size. |
|
Write a header in the buffer. We will prepend the header to the front of the chain. Do not write the buffer if empty (we don't allow empty records). Returns the total length, including header (0 if empty) (same as buf‐>computeChainDataLength(), but likely faster) |
|
Check if there is a valid record at the beginning of range. This validates both record header and data and Returns the record data (not the header) if the record is valid, ByteRange() otherwise. |
|
Check if there Record Data is valid (to be used after validating the header separately) Returns the record data (not the header) if the record data is valid, ByteRange() otherwise. |
|
Check if the Record Header is valid at the beginning of range. Useful to check the validity of the header before building the entire record in IOBuf. If the record is from storage device (e.g. flash) then, it is better to make sure that the header is valid before reading the data from the storage device. Returns true if valid, false otherwise. |
folly::replaceable_detail namespace
Implementation details for Replaceable; not part of the public API.
Types
Name |
Description |
Mixin supplying the copy‐assignment operator for |
|
Mixin supplying the copy constructor for |
|
Mixin supplying default and move constructors for |
|
Mixin supplying a destructor for |
|
Trait that is true if |
|
Trait that is true if any |
|
Mixin supplying the move‐assignment operator for |
folly::settings namespace
Runtime configuration settings framework.
Types
Name |
Description |
Parses command line arguments into folly::settings. |
|
An immutable snapshot of the set of frozen setting projects. |
|
Interface for applying string‐based setting changes to a snapshot. |
|
Static information about the setting definition |
|
Type containing the string representation of a setting as well as the static metadata associated with it. Used as the "source" in setting conversion. |
|
This class is a proxy for working with folly::settings represented as strings. It can apply changes to these folly::settings via snapshot provided by user. Changes are not going to be published by this class, it is callers resposibility to commit/publish cahnges from snapshot into global state. |
|
Captures the current state of all setting values and allows updating multiple settings at once, with verification and rollback. |
Type Aliases
Name |
Description |
Result of a setting update operation: Unit on success or a SetErrorCode. |
Enums
Name |
Description |
Outcome of parsing command line arguments. |
|
Indicates whether a setting accepts overrides from the command line. |
|
Indicates whether a setting can change after initialization. |
|
Error codes for a failed setting update. |
Functions
Name |
Description |
Like parseTo in folly/Conv.h, but the "source" is SettingValueAndMetadata instead of a StringPiece. Defaults to folly::tryTo<T>(StringPiece) but can be overridden using ADL for user defined types. |
|
Freezes immutable settings ‐ preventing subsequent mutation attempts. It's up to the caller to call this function after settings have been initialized. |
|
Returns a snapshot of the current set of frozen setting projects. |
|
Returns the metadata for all registered settings in the process. |
|
Returns the default value of a setting by name, if it exists and has type T. |
|
Gets a folly::observer::Observer<T> for a given setting. For example: folly::settings::getObserver(FOLLY_SETTING(project, retention)) |
|
Returns the metadata for a setting by name, if it exists. |
|
Reports whether immutable settings for a project have been frozen. |
|
Main function to parse arguments folly::settings. This function parses command line arguments into folly::settings. It moves all positional, ‐‐help, not recognized flags and their values to the end of the argv array. It stops parsing arguments after '‐‐' is encoutered. |
|
Outputs help message into stderr. May terminate program if error was encoutered during arguments parsing or exit is requested by caller. |
|
Converts a setting value and metadata to type T, throwing on error. |
|
Returns the string representation of a set error code. |
|
Conversion functions for converting a SettingValueAndMetadata to a setting type T. Implementation is similar to folly/Conv and allows for customization using the convertTo function above. |
Variables
Name |
Description |
Name of the command line flag that requests the help message. |
folly::shared_mutex_detail namespace
Implementation details for SharedMutex; not part of the public API.
Types
Name |
Description |
Ownership tracker that records nothing. |
|
Policy that suppresses ThreadSanitizer rwlock annotations. |
|
Policy that enables tracking the id of the thread holding the lock. |
|
Ownership tracker that records the id of the owning thread. |
Functions
Name |
Description |
Returns a guard that gives permission for the current thread to annotate, and adjust the annotation bits in, the SharedMutex at ptr. |
|
Returns the number of involuntary context switches for the current thread. |
|
Returns the current maximum number of deferred readers. |
|
Computes and caches the current maximum number of deferred readers. |
|
|
Throws a system error indicating a deadlock would occur. |
|
Throws a system error indicating the operation is not permitted. |
Variables
Name |
Description |
Upper bound on the number of deferred reader slots that may be allocated. |
folly::simd namespace
SIMD algorithms and utilities.
Types
Name |
Description |
composite_finder |
|
ignore(_none/_extrema) |
|
Tag type indicating that the whole register is used. |
Type Aliases
Name |
Description |
|
The SIMD azmatch‐based find‐first‐not‐of finder specialized for char. |
The SIMD azmatch‐based find‐first‐of finder specialized for char. |
|
|
Alias for the SIMD azmatch‐based find‐first‐not‐of finder. |
|
Alias for the SIMD azmatch‐based find‐first‐of finder. |
|
Alias for the default scalar find‐first‐not‐of finder. |
|
Alias for the default scalar find‐first‐of finder. |
|
Alias for the SIMD‐accelerated default find‐first‐not‐of finder. |
|
Alias for the SIMD‐accelerated default find‐first‐of finder. |
|
Alias for the lookup‐table‐indexed scalar find‐first‐not‐of finder. |
|
Alias for the lookup‐table‐indexed scalar find‐first‐of finder. |
|
Alias for the sparse lookup‐table scalar find‐first‐not‐of finder. |
|
Alias for the sparse lookup‐table scalar find‐first‐of finder. |
|
Find‐first‐of finder that wraps folly::Range::find_first_of. |
|
Alias for the SIMD shuffle‐based find‐first‐not‐of finder. |
|
Alias for the SIMD shuffle‐based find‐first‐of finder. |
|
Alias for the std::find_first_of based scalar find‐first‐of finder. |
|
The default scalar find‐first‐not‐of finder specialized for char. |
The default scalar find‐first‐of finder specialized for char. |
|
|
The SIMD‐accelerated default find‐first‐not‐of finder specialized for char. |
The SIMD‐accelerated default find‐first‐of finder specialized for char. |
|
|
The lookup‐table‐indexed scalar find‐first‐not‐of finder specialized for char. |
The lookup‐table‐indexed scalar find‐first‐of finder specialized for char. |
|
|
The sparse lookup‐table scalar find‐first‐not‐of finder specialized for char. |
The sparse lookup‐table scalar find‐first‐of finder specialized for char. |
|
Range‐based find‐first‐of finder specialized for char. |
|
|
The SIMD shuffle‐based find‐first‐not‐of finder specialized for char. |
The SIMD shuffle‐based find‐first‐of finder specialized for char. |
|
The std::find_first_of based scalar find‐first‐of finder specialized for char. |
folly::small_vector_policy namespace
Policies that customize the behavior of folly::small_vector.
Types
Name |
Description |
Combines several small_vector policies into a single policy. |
|
Policy selecting whether a small_vector may only store elements in situ. |
|
Policy selecting the size_type used by a small_vector. |
folly::ssl namespace
SSL and TLS helpers built on OpenSSL.
Namespaces
Name |
Description |
Implementation details for the SSL options helpers. |
Types
Name |
Description |
In‐memory transport certificate holding an identity and an optional X509. |
|
Parsed fields extracted from a TLS ClientHello message. |
|
A DNS name subjectAltName entry. |
|
Utilities for inspecting and encoding X509 certificates. |
|
OpenSSL‐backed message digest and HMAC helpers. |
|
Utilities for reading and encoding private keys with OpenSSL. |
|
Helpers wrapping low‐level OpenSSL certificate, BIO, and session operations. |
|
Collects passwords used to decrypt private keys. |
|
SSLOptions2021 contains options that any new client or server from 2021 onwards should be using. |
|
Recommended SSL options that stay compatible with older peers. |
|
SSLServerOptionsCompatibility contains algorithms that are not recommended for modern servers, but are included to maintain comaptibility with very old clients. |
|
An abstraction for SSL sessions. |
|
A class that manages one SSL session. |
|
A URI subjectAltName entry. |
Type Aliases
Name |
Description |
Deleter that frees a single BIO via BIO_free_fb. |
|
Owning unique_ptr alias for a single BIO freed via BIO_free_fb. |
|
Shared‐ownership pointer to an EVP_PKEY object. |
|
A subjectAltName entry: a DNS name, a URI, or an IP address. |
|
Default option set for clients and general use. |
|
Default option set for servers. |
|
Owning unique_ptr alias for an X509_VERIFY_PARAM object. |
|
Deleter that frees an X509_VERIFY_PARAM object. |
Enums
Name |
Description |
TLS signature‐scheme hash algorithm codes (IANA tls‐parameters). |
|
TLS server‐name entry type. |
|
TLS signature‐scheme signature algorithm codes (IANA tls‐parameters). |
|
TLS extension type codes, per the IANA tls‐extensiontype‐values registry. |
Functions
Name |
Description |
Frees a single BIO, asserting that the underlying BIO_free succeeds. |
|
|
|
Set the groups of ctx to that in TSSLOptions, and print any runtime error it catches. |
|
Set the signature algorithm list of ctx to that in TSSLOptions, and print any runtime errors it catche. |
|
Writes a password collector's description to an output stream. |
folly::ssl::ssl_options_detail namespace
Implementation details for the SSL options helpers.
Functions
Name |
Description |
Logs an exception at DFATAL severity. |
folly::stable_radix_sort_detail namespace
Implementation details for the stable radix sort.
Types
Name |
Description |
Default projection that handles common types. |
|
Projection wrapper that applies type‐appropriate transformation. |
Functions
Name |
Description |
Extract the radix digit at the given pass index from a key. Pass 0 extracts the least significant digit. |
|
Stable insertion sort for small inputs. O(nˆ2) but fast for small n due to low overhead. |
|
Wrapper that handles buffer allocation and fallback to std::stable_sort. |
|
Core LSD radix sort implementation with alternating buffers. |
Variables
Name |
Description |
Number of bits processed per radix pass. |
|
Number of counting‐sort buckets per pass (2ˆkRadixBits). |
|
Mask selecting the low kRadixBits of a digit. |
|
Number of radix passes needed to sort a key of the given type. |
|
Size threshold below which we fall back to insertion sort. |
folly::stable_radix_sort_keys namespace
Stable LSD (Least Significant Digit) Radix Sort
Types
Name |
Description |
FloatKey ‐ Converts IEEE 754 floats/doubles to sortable unsigned integers. |
|
IdentityKey ‐ Returns the value unchanged (for unsigned integers). |
|
IntegralKey ‐ Handles signed/unsigned integers for radix sort. |
folly::symbolizer namespace
Stack trace capture and symbolization utilities.
Types
Name |
Description |
Format one address in the way it's usually printed by SymbolizePrinter. Async‐signal‐safe. |
|
A memory‐mapped ELF object file. |
|
Print a list of symbolized addresses to a file descriptor. Ignores errors. Async‐signal‐safe. |
|
Print a list of symbolized addresses to a FILE*. Ignores errors. Not reentrant. Do not use from signal handling code. |
|
A fixed‐capacity array of captured addresses and their symbolized frames. |
|
Async‐signal‐safe line reader. |
|
Contains location info like file name, line number, etc. |
|
Print a list of symbolized addresses to a stream. Not reentrant. Do not use from signal handling code. |
|
Represent a file path as a collection of three parts (base directory, subdirectory, and file). |
|
Use this class to print a stack trace from a signal handler, or other place where you shouldn't allocate memory on the heap, and fsync()ing your file descriptor is more important than performance. |
|
Print a list of symbolized addresses to a std::string. Not reentrant. Do not use from signal handling code. |
|
A cache of symbolized frames, keyed by instruction address. |
|
Print a list of symbolized addresses. Base class. |
|
Frame information: symbol name and location. |
Type Aliases
Name |
Description |
Symbolized frames for a single address: the stacked inline calls, if any, followed by the non‐inlined call. Most addresses have no inlined frames, so optimize for the single‐entry case. |
|
Add a callback to be run when receiving a fatal signal. They will also be called by LOG(FATAL) and abort() (as those raise SIGABRT internally). |
Enums
Name |
Description |
How aggressively to resolve source location information. |
Functions
Name |
Description |
Register a callback to be run when a fatal signal is received. |
|
True if a fatal signal was received (i.e. the process is crashing). |
|
|
|
Async stack trace as a string; empty when symbolization is unavailable. |
|
The process‐wide cache for |
|
|
|
|
|
|
|
|
|
Async stack traces for suspended coroutines; empty when unavailable. |
|
Install the fatal signal callbacks; fatal signals will call these callbacks in the order in which they were added. |
|
Install handler for fatal signals. The list of signals being handled is in SignalHandler.cpp. |
|
A cache of roughly |
|
An LRU cache of |
|
A cache that stores nothing. |
|
Write a Path to an output stream. |
Variables
Name |
Description |
Bitmask of all fatal signals handled by the symbolizer signal handler. |
folly::test namespace
Testing utilities.
Types
Name |
Description |
Temporarily capture a file descriptor by redirecting it into a file. You can consume its entire output thus far via read(), incrementally via readIncremental(), or via callback using chunk_cob. Great for testing logging (see also glog*Pattern()). |
|
Changes into a temporary directory, and deletes it with all its contents upon destruction, also changing back to the original working directory. |
|
RAII class allowing scoped changes to the process environment. The environment state at the time of its construction is restored at the time of its destruction. |
|
Temporary directory. |
|
Temporary file. |
Functions
Name |
Description |
Finds the file path of a resource which was built alongside a test binary. |
|
PCRE pattern matching a glog error‐level or warning‐level log line. |
|
Use these patterns together with CaptureFD and EXPECT_PCRE_MATCH() to test for the presence (or absence) of log lines at a particular level: |
|
PCRE pattern matching a glog warning‐level log line. |
|
Invokes a function while suppressing the Windows CRT abort on invalid parameters. |
folly::threadlocal_detail namespace
Implementation details.
Types
Name |
Description |
POD wrapper around an element (a void*) and an associated deleter. This must be POD, as we memset() it to 0 and memcpy() it around. |
|
No‐op stand‐in for UniqueInstance used when the tag is void. |
|
Deleter that owns a shared_ptr and disposes it on thread‐local destruction. |
|
Held in a singleton to track our global instances. We have one of these per "Tag", by default one for the whole system (Tag=void). |
|
Non‐templated base holding the shared thread‐local bookkeeping state. |
|
Per‐thread entry. Each thread using a StaticMeta object has one. This is written from the owning thread only (under the lock), read from the owning thread (no lock necessary), and read from other threads (under the lock). |
|
Intrusive list of ThreadEntry objects for a single thread. |
|
ThreadEntrySet is used to track all ThreadEntry that have a valid ElementWrapper for a particular TL id. The class provides no internal locking and caller must ensure safety of any access. |
Type Aliases
Name |
Description |
Cache the ptr + deleter info in ThreadEntrySet too. This allows accessAllThreads() to get to the per thread ptr without holding the StaticMeta's lock_. Eventually, the deleter info will be moved to the ThreadEntrySet alone, leaving only the ptr in the ElementWrapper. For now, the ElementDisposeInfo tracked in ThreadEntrySet is the same as ElementWrapper. |
Variables
Name |
Description |
Sentinel entry id representing an unallocated thread‐local slot. |
folly::traits_detail namespace
There is a bug in libstdc++, libc++, and MSVC's STL that causes it to ignore unused template parameter arguments in template aliases and does not cause substitution failures. This defect has been recorded here: http://open‐std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558.
Types
Name |
Description |
A helper pairing an index with the type at that position. |
|
A helper collecting a type pack as a set of indexed types. |
|
A helper that recovers the type stored at a given index. |
|
A helper that exposes its first type argument, ignoring the rest. |
|
A helper mapping a bit width to the unsigned integer type of that width. |
|
A helper exposing the size and elements of a value list. |
|
A helper wrapping a single value as a type carrying that value. |
Type Aliases
Name |
Description |
A fallback implementation of type_pack_element_t without the builtin. |
|
An alias building the indexed‐type set for the pack T. |
Functions
Name |
Description |
Deduces the type identity of the Ith element of a type list. |
|
Deduces the size of a type list. |
folly::traits_detail_IsEqualityComparable namespace
Implementation namespace for the IsEqualityComparable trait.
Types
Name |
Description |
A trait to test whether values of T and U can be compared with operator==. |
Functions
Name |
Description |
A fallback operator used to detect the absence of a real operator==. |
folly::traits_detail_IsLessThanComparable namespace
Implementation namespace for the IsLessThanComparable trait.
Types
Name |
Description |
A trait to test whether values of T and U can be compared with operator<. |
Functions
Name |
Description |
A fallback operator used to detect the absence of a real operator<. |
ranges namespace
The range‐v3 library namespace.
Variables
Name |
Description |
Trait template that marks a type as a range‐v3 view. |
|
Marks folly::Range as satisfying the range‐v3 view concept. |
std namespace
Standard library specializations of std::hash for Folly and standard types.
Namespaces
Name |
Description |
Standard library namespace. |
Types
Name |
Description |
|
Coroutine traits selecting the promise type for a |
|
|
|
|
|
|
Hash support for folly::IPAddress. |
|
Hash support for |
|
Hash specialization enabling |
|
Specialization of std::hash for folly::MacAddress. |
|
Hash specialization for folly::NetworkSocket. |
|
std::hash specialization for folly::RegexMatchCacheKey. |
|
Hash specialization for folly::RequestToken. |
|
Specialization of std::hash for folly::SocketAddress. |
|
Hash specialization for AsyncSocket::WriteRequestTag. |
|
Standard library hash specialization for folly::dynamic. |
|
Hash support so strong types can be keys in unordered containers. |
|
Hash specialization enabling folly::Optional in unordered containers. |
|
|
|
std::hash specialization for std::tuple. |
|
std::hash specialization for folly::unique_hash_key. |
|
|
std::hash specialization for folly::unique_hash_key_with. |
Hash specialization for basic_cstring_view, matching string_view hashing. |
|
Hash specialization for |
|
Hashing: ‐ Forwards to underlying PtrT. |
|
std::hash specialization for std::pair. |
|
Hash specialization for folly::small_vector. |
|
Marks folly::cli_apply_args_files_errc as an error‐code enum. |
|
|
|
|
|
|
|
|
std::shared_lock specialization for folly::SharedMutexImpl. |
|
Type of the I‐th element of a lite_tuple. |
Number of elements in a lite_tuple. |