ThreadResultRef< RESULTVALUETYPE > Class Template Reference 线程

#include <thread.h>

详细描述

template<typename RESULTVALUETYPE>
class maxon::ThreadResultRef< RESULTVALUETYPE >

Reference to a thread that returns more than void/Result<void>.

公共成员函数

  ThreadResultRef (const ThreadRef & src )
  ThreadResultRef ( ThreadRef && src )
Result < RESULTVALUETYPE >  GetResult ( TimeValue timeout= TIMEVALUE_INFINITE , WAITMODE mode= WAITMODE::DEFAULT ) const

构造函数 & 析构函数文档编制

◆  ThreadResultRef() [1/2]

ThreadResultRef ( const ThreadRef src )
explicit

◆  ThreadResultRef() [2/2]

ThreadResultRef ( ThreadRef &&  src )
explicit

成员函数文档编制

◆  GetResult()

Result <RESULTVALUETYPE> GetResult ( TimeValue   timeout = TIMEVALUE_INFINITE ,
WAITMODE   mode = WAITMODE::DEFAULT  
) const

Waits until this thread has been executed and returns the result. THREADSAFE.

参数
[in] timeout Maximum wait interval (or TIMEVALUE_INFINITE for no time-out).
[in] mode WAITMODE::DEFAULT by default. WAITMODE::RETURN_ON_CANCEL means that Wait() will return if the caller has been cancelled even if the condition has not been set yet.
返回
OK on success.