85 void init(
bool recordStackUsed);
90 template <
typename F,
typename G>
138 template <
typename T>
142 return *
reinterpret_cast<T*
>(
data_);
150 template <
typename T>
156 template <
typename T>
158 template <
typename T>
160 template <
typename T>
180 #ifdef FOLLY_SANITIZE_ADDRESS 181 void* asanFakeStack_{
nullptr};
182 const void* asanMainStackBase_{
nullptr};
183 size_t asanMainStackSize_{0};
void setFunctionFinally(F &&func, G &&finally)
std::pair< void *, size_t > getStack() const
std::vector< uint8_t > buffer(kBufferSize+16)
std::aligned_storage< kUserBufferSize >::type userBuffer_
static void freeHeapBuffer(void *buffer)
folly::IntrusiveListHook listHook_
void(* dataDestructor_)(void *)
static void dataBufferDestructor(void *)
static void dataCopyConstructor(void *, const void *)
unsigned char * fiberStackLimit_
std::aligned_storage< kBufferSize >::type buffer_
const std::type_info * dataType_
—— Concurrent Priority Queue Implementation ——
bool stackFilledWithMagic_
static void * allocateHeapBuffer(size_t size)
void setFunction(F &&func)
folly::Function< void()> resultFunc_
Fiber(const Fiber &)=delete
static constexpr size_t kBufferSize
Single-threaded task execution engine.
constexpr auto size(C const &c) -> decltype(c.size())
Fiber object used by FiberManager to execute tasks.
std::shared_ptr< RequestContext > rcontext_
FOLLY_NOINLINE T & getSlow()
boost::intrusive::list_member_hook< boost::intrusive::link_mode< boost::intrusive::auto_unlink >> IntrusiveListHook
void recordStackPosition()
void preempt(State state)
static constexpr size_t kUserBufferSize
void init(bool recordStackUsed)
FiberManager & fiberManager_
folly::Function< void()> func_
folly::Function< void()> finallyFunc_
std::thread::id threadId_
void(* dataCopyConstructor_)(void *, const void *)
static void dataHeapDestructor(void *)
LocalData & operator=(const LocalData &other)
folly::IntrusiveListHook globalListHook_
Fiber & operator=(const Fiber &)=delete
folly::AtomicIntrusiveLinkedListHook< Fiber > nextRemoteReady_