Gin
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
RemoteServer::Context Class Reference

Passed to async commands so they can hop onto the message thread and pause between steps. More...

#include <gin_remoteserver.h>

Public Member Functions

 Context (RemoteServer &s)
 
CommandResult runOnMessageThread (std::function< CommandResult()> fn)
 Runs a function on the message thread and waits for it, honouring Options::messageThreadTimeoutMs.
 
bool sleep (int ms)
 Sleeps on the server thread.
 

Public Attributes

RemoteServer & server
 

Detailed Description

Passed to async commands so they can hop onto the message thread and pause between steps.

Constructor & Destructor Documentation

◆ Context()

RemoteServer::Context::Context ( RemoteServer &  s)

Member Function Documentation

◆ runOnMessageThread()

CommandResult RemoteServer::Context::runOnMessageThread ( std::function< CommandResult()>  fn)

Runs a function on the message thread and waits for it, honouring Options::messageThreadTimeoutMs.

References server.

◆ sleep()

bool RemoteServer::Context::sleep ( int  ms)

Sleeps on the server thread.

Returns false if the server is shutting down.

References server.

Member Data Documentation

◆ server

RemoteServer& RemoteServer::Context::server

Referenced by runOnMessageThread(), and sleep().


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