16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 03:09:18 +02:00

basic texture generation support, python multithreading fixes

This commit is contained in:
tmj-fstate
2018-10-21 01:29:27 +02:00
parent b51d5c3d2b
commit b36ed8db6c
11 changed files with 298 additions and 130 deletions

View File

@@ -151,12 +151,27 @@ eu07_application::run() {
return 0;
}
// issues request for a worker thread to perform specified task. returns: true if task was scheduled
bool
eu07_application::request( python_taskqueue::task_request const &Task ) {
return m_taskqueue.insert( Task );
}
// ensures the main thread holds the python gil and can safely execute python calls
void
eu07_application::acquire_python_lock() {
m_taskqueue.acquire_lock();
}
// frees the python gil and swaps out the main thread
void
eu07_application::release_python_lock() {
m_taskqueue.release_lock();
}
void
eu07_application::exit() {