Classes | Public Member Functions | List of all members
util::fibers_ext::FiberQueueThreadPool Class Reference

Public Member Functions

 FiberQueueThreadPool (unsigned num_threads=0, unsigned queue_size=128)
 
template<typename F >
auto Await (F &&f) -> decltype(f())
 
template<typename F >
auto Await (size_t worker_index, F &&f) -> decltype(f())
 
template<typename F >
void Add (F &&f)
 
template<typename F >
bool Add (size_t index, F &&f)
 Runs f on a worker pinned by "index". index does not have to be in range. More...
 
FiberQueueGetQueue (size_t index)
 
void Shutdown ()
 

Detailed Description

Definition at line 101 of file fiberqueue_threadpool.h.

Member Function Documentation

◆ Add()

template<typename F >
bool util::fibers_ext::FiberQueueThreadPool::Add ( size_t  index,
F &&  f 
)
inline

Runs f on a worker pinned by "index". index does not have to be in range.

Template Parameters
F
Parameters
index
f
Returns
true if Add() had to preempt, false is fast path without preemptions was executed.

Definition at line 156 of file fiberqueue_threadpool.h.


The documentation for this class was generated from the following files: