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

Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2019-01-27 20:44:05 +01:00
7 changed files with 145 additions and 124 deletions

View File

@@ -167,7 +167,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