As i mentioned, script calls back C++ code with functions that have very long execution time, so processing interval does nothing - it will not interrupt C++ function execution . Maybe it's possible to decouple script itself and execution of C++ functions somehow?