Open lshamis opened 8 months ago
Yes, the buffering is per function. It's being moved in several instances to the call context instead, but some of them are argument dependent (incl. converters for std::string
) and take a bit more work. Simplest workaround, for now, is to change the code to not need a buffer:
executor.submit(job, cppyy.gbl.std.string(data))
I'm trying to run C++ functions in Python threads. To allow them to run concurrently, I mark them with
__release_gil__ = True
. Unfortunately, there seems to be some buffering of arguments (or something) and the Python arguments overwrite on their way to C++.Reproducible test case:
Output: