Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtOhos::QOhosMtBlockingCallsGateway< SlaveContext > Class Template Reference

#include <qohosmtblockingcallsgateway_p.h>

Inheritance diagram for QtOhos::QOhosMtBlockingCallsGateway< SlaveContext >:
Collaboration diagram for QtOhos::QOhosMtBlockingCallsGateway< SlaveContext >:

Public Types

enum class  MasterThreadTaskResult { CancelledByDeadlock , TimeoutedBeforeStart , TimeoutedAfterStart , Finished }

Public Member Functions

void invokeInMasterThread (std::function< void()> &&task)
void invokeInSlaveThread (std::function< void(SlaveContext &)> &&task)
void runInSlaveThreadAndWaitForContinue (std::function< void(SlaveContext &, QOhosTaskPromise<>)> &&task, const std::string &callerContextName=std::string())
Q_REQUIRED_RESULT MasterThreadTaskResult tryInvokeInMasterThreadAndTryWaitForContinue (QOhosConsumer< std::function< void()> > &&task, std::chrono::nanoseconds timeout)

Static Public Member Functions

static std::shared_ptr< QOhosMtBlockingCallsGateway< SlaveContext > > makeInstance (QOhosConsumer< std::function< void()> > masterThreadTasksExecutor, QOhosConsumer< std::function< void(SlaveContext &)> > slaveThreadTasksExecutor)

Detailed Description

template<typename SlaveContext>
class QtOhos::QOhosMtBlockingCallsGateway< SlaveContext >

Definition at line 34 of file qohosmtblockingcallsgateway_p.h.

Member Enumeration Documentation

◆ MasterThreadTaskResult

template<typename SlaveContext>
enum class QtOhos::QOhosMtBlockingCallsGateway::MasterThreadTaskResult
strong
Enumerator
CancelledByDeadlock 
TimeoutedBeforeStart 
TimeoutedAfterStart 
Finished 

Definition at line 37 of file qohosmtblockingcallsgateway_p.h.

Member Function Documentation

◆ invokeInMasterThread()

template<typename SlaveContext>
void QtOhos::QOhosMtBlockingCallsGateway< SlaveContext >::invokeInMasterThread ( std::function< void()> && task)

Definition at line 98 of file qohosmtblockingcallsgateway_p.h.

◆ invokeInSlaveThread()

template<typename SlaveContext>
void QtOhos::QOhosMtBlockingCallsGateway< SlaveContext >::invokeInSlaveThread ( std::function< void(SlaveContext &)> && task)

Definition at line 104 of file qohosmtblockingcallsgateway_p.h.

Referenced by runInSlaveThreadAndWaitForContinue().

Here is the caller graph for this function:

◆ makeInstance()

template<typename SlaveContext>
std::shared_ptr< QOhosMtBlockingCallsGateway< SlaveContext > > QtOhos::QOhosMtBlockingCallsGateway< SlaveContext >::makeInstance ( QOhosConsumer< std::function< void()> > masterThreadTasksExecutor,
QOhosConsumer< std::function< void(SlaveContext &)> > slaveThreadTasksExecutor )
static

Definition at line 79 of file qohosmtblockingcallsgateway_p.h.

◆ runInSlaveThreadAndWaitForContinue()

template<typename SlaveContext>
void QtOhos::QOhosMtBlockingCallsGateway< SlaveContext >::runInSlaveThreadAndWaitForContinue ( std::function< void(SlaveContext &, QOhosTaskPromise<>)> && task,
const std::string & callerContextName = std::string() )

Definition at line 110 of file qohosmtblockingcallsgateway_p.h.

References invokeInSlaveThread().

Here is the call graph for this function:

◆ tryInvokeInMasterThreadAndTryWaitForContinue()

template<typename SlaveContext>
QOhosMtBlockingCallsGateway< SlaveContext >::MasterThreadTaskResult QtOhos::QOhosMtBlockingCallsGateway< SlaveContext >::tryInvokeInMasterThreadAndTryWaitForContinue ( QOhosConsumer< std::function< void()> > && task,
std::chrono::nanoseconds timeout )

Definition at line 154 of file qohosmtblockingcallsgateway_p.h.


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