Audacity 3.2.0
Static Public Member Functions | List of all members
ScriptCommandRelay Class Reference

ScriptCommandRelay is just a way to move some of the scripting-specific code out of ModuleManager. More...

#include <ScriptCommandRelay.h>

Static Public Member Functions

static void StartScriptServer (tpRegScriptServerFunc scriptFn)
 Starts the script server. More...
 

Detailed Description

ScriptCommandRelay is just a way to move some of the scripting-specific code out of ModuleManager.

Definition at line 28 of file ScriptCommandRelay.h.

Member Function Documentation

◆ StartScriptServer()

void ScriptCommandRelay::StartScriptServer ( tpRegScriptServerFunc  scriptFn)
static

Starts the script server.

Definition at line 79 of file ScriptCommandRelay.cpp.

80{
81 wxASSERT(scriptFn != NULL);
82
83 auto server = [](tpRegScriptServerFunc function)
84 {
85 while (true)
86 {
87 function(ExecFromWorker);
88 }
89 };
90
91 std::thread(server, scriptFn).detach();
92}
static int ExecFromWorker(wxString *pIn, wxString *pOut)
Executes a command in the worker (script) thread.
int(* tpRegScriptServerFunc)(tpExecScriptServerFunc pFn)

References ExecFromWorker().

Referenced by ModuleDispatch().

Here is the call graph for this function:
Here is the caller graph for this function:

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