18 #ifndef FOEDUS_THREAD_THREAD_POOL_HPP_
19 #define FOEDUS_THREAD_THREAD_POOL_HPP_
152 const void* task_input,
153 uint64_t task_input_size,
174 uint64_t task_input_size = 0) {
176 if (!
impersonate(proc_name, task_input, task_input_size, &session)) {
189 const void* task_input,
190 uint64_t task_input_size,
201 uint64_t task_input_size = 0) {
216 const void* task_input,
217 uint64_t task_input_size,
228 uint64_t task_input_size = 0) {
249 #endif // FOEDUS_THREAD_THREAD_POOL_HPP_
ThreadPoolPimpl * get_pimpl() const
Returns the pimpl of this object.
Pimpl object of ThreadPool.
A view of Thread group object for other SOCs and master engine.
ErrorStack get_result()
Waits until the completion of the asynchronous session and retrieves the result.
The pure-virtual interface to initialize/uninitialize non-trivial resources.
#define CXX11_NULLPTR
Used in public headers in place of "nullptr" of C++11.
#define ERROR_STACK(e)
Instantiates ErrorStack with the given foedus::error_code, creating an error stack with the current f...
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
ThreadRef * get_thread_ref(ThreadId id)
bool impersonate_on_numa_core(ThreadId core, const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session)
Overload to specify a core to run on.
0x0E01 : "THREAD : No worker thread is available for impersonation." .
Forward declarations of classes in root package.
Brings error stacktrace information as return value of functions.
bool impersonate_on_numa_node(ThreadGroupId node, const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session)
Overload to specify a NUMA node to run on.
A user session running on an impersonated thread.
bool is_initialized() const override
Returns whether the object has been already initialized or not.
ThreadGroupRef * get_group_ref(ThreadGroupId numa_node)
ErrorStack impersonate_synchronous(const proc::ProcName &proc_name, const void *task_input=nullptr, uint64_t task_input_size=0)
A shorthand for impersonating a session and synchronously waiting for its end.
#define CXX11_FINAL
Used in public headers in place of "final" of C++11.
Database engine object that holds all resources and provides APIs.
Typedefs of ID types used in procedure package.
A view of Thread object for other SOCs and master engine.
ErrorStack uninitialize() override
An idempotent method to release all resources of this object, if any.
friend std::ostream & operator<<(std::ostream &o, const ThreadPool &v)
#define CXX11_OVERRIDE
Used in public headers in place of "override" of C++11.
#define CXX11_FUNC_DELETE
Used in public headers in place of " = delete" of C++11.
uint16_t ThreadId
Typedef for a global ID of Thread (core), which is unique across NUMA nodes.
ErrorStack impersonate_on_numa_core_synchronous(ThreadId core, const proc::ProcName &proc_name, const void *task_input=nullptr, uint64_t task_input_size=0)
A shorthand for impersonating a session and synchronously waiting for its end.
ErrorStack initialize() override
Acquires resources in this object, usually called right after constructor.
ErrorStack impersonate_on_numa_node_synchronous(ThreadGroupId node, const proc::ProcName &proc_name, const void *task_input=nullptr, uint64_t task_input_size=0)
A shorthand for impersonating a session and synchronously waiting for its end.
bool impersonate(const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session)
Impersonate as one of pre-allocated threads in this engine, executing the procedure on the impersonat...
Forward declarations of classes in thread package.
uint8_t ThreadGroupId
Typedef for an ID of ThreadGroup (NUMA node).
The pool of pre-allocated threads in the engine to execute transactions.