cpp-python interop: checking multithreading issue