18 #ifndef FOEDUS_THREAD_IMPERSONATE_SESSION_HPP_
19 #define FOEDUS_THREAD_IMPERSONATE_SESSION_HPP_
69 #ifndef DISABLE_CXX11_IN_PUBLIC_HEADERS
73 #endif // DISABLE_CXX11_IN_PUBLIC_HEADERS
119 bool wait_for(uint64_t timeout_microsec)
const;
143 #endif // FOEDUS_THREAD_IMPERSONATE_SESSION_HPP_
void release()
Releases all resources and ownerships this session has acquired.
ErrorStack get_result()
Waits until the completion of the asynchronous session and retrieves the result.
#define CXX11_NULLPTR
Used in public headers in place of "nullptr" of C++11.
thread::ThreadRef * thread_
The impersonated thread.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
uint64_t get_output_size()
Returns the byte size of output.
void wait() const
Blocks until the completion of the asynchronous session.
Brings error stacktrace information as return value of functions.
thread::ThreadTicket ticket_
The ticket issued as of impersonation.
A user session running on an impersonated thread.
bool is_running() const
Returns if the task is still running.
#define CXX11_FINAL
Used in public headers in place of "final" of C++11.
const void * get_raw_output_buffer()
Returns the pointer to the raw output buffer on shared memory.
bool is_valid() const
Returns if the impersonation succeeded.
void get_output(void *output_buffer)
Copies the output to the given buffer, whose size must be at least get_output_size().
A view of Thread object for other SOCs and master engine.
bool wait_for(uint64_t timeout_microsec) const
Blocks until either the asynchronous session completes or the specified time elapses.
ImpersonateSession & operator=(const ImpersonateSession &other)=delete
#define CXX11_FUNC_DELETE
Used in public headers in place of " = delete" of C++11.
friend std::ostream & operator<<(std::ostream &o, const ImpersonateSession &v)
Forward declarations of classes in thread package.
uint64_t ThreadTicket
Typedef for a monotonically increasing ticket for thread impersonation.