Merge branch 'gfx-work' into sim

This commit is contained in:
milek7
2019-04-15 12:10:11 +02:00
34 changed files with 489 additions and 169 deletions

View File

@@ -10,10 +10,10 @@ http://mozilla.org/MPL/2.0/.
#include "stdafx.h"
#include "PyInt.h"
#include "Globals.h"
#include "dictionary.h"
#include "application.h"
#include "renderer.h"
#include "Logs.h"
#include "Globals.h"
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wwrite-strings"
@@ -141,6 +141,11 @@ auto python_taskqueue::init() -> bool {
Py_SetPythonHome("linuxpython64");
else
Py_SetPythonHome("linuxpython");
#elif __APPLE__
if (sizeof(void*) == 8)
Py_SetPythonHome("macpython64");
else
Py_SetPythonHome("macpython");
#endif
Py_Initialize();
PyEval_InitThreads();
@@ -209,7 +214,8 @@ void python_taskqueue::exit() {
m_condition.notify_all();
// let them free up their shit before we proceed
for( auto &worker : m_workers ) {
worker.join();
if (worker.joinable())
worker.join();
}
// get rid of the leftover tasks
// with the workers dead we don't have to worry about concurrent access anymore