get_gui_proxy();
}
-const InterpreterThread *ThreadManager::create_interpreter() {
-
+InterpreterThread *ThreadManager::create_interpreter()
+{
static QMutex interpreter_lock;
static InterpreterThread *interpreter_thread;
if (interpreter_lock.tryLock()) {
// we're the first thread
interpreter_thread = new InterpreterThread();
- interpreter_thread->start();
}
- return interpreter_thread;
// someone already started a copy of the interpreter
+ return interpreter_thread;
}
GuiProxy *ThreadManager::get_gui_proxy()