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

Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2019-01-27 21:07:03 +01:00
8 changed files with 152 additions and 128 deletions

View File

@@ -182,7 +182,13 @@ eu07_application::run() {
bool
eu07_application::request( python_taskqueue::task_request const &Task ) {
return m_taskqueue.insert( Task );
auto const result { m_taskqueue.insert( Task ) };
if( ( false == result )
&& ( Task.input != nullptr ) ) {
// clean up allocated resources since the worker won't
delete Task.input;
}
return result;
}
// ensures the main thread holds the python gil and can safely execute python calls