mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Merge branch 'gfx-work' into udpnetwork
This commit is contained in:
@@ -282,7 +282,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
|
||||
|
||||
Reference in New Issue
Block a user