Release GIL during append calls, similar to the other calls. Otherwise, one might encounter performance issues.

PiperOrigin-RevId: 1005039469
This commit is contained in:
A. Unique TensorFlower authored and TensorFlower Gardener committed 2026-10-23 01:19:20 -07:00
1 parent b360f5cae0
commit 304cbf7870
1 file changed
+1
@@ -237,6 +237,7 @@ PYBIND11_MODULE(_pywrap_file_io, m) {
py::arg("filename"), py::arg("mode"))
.def("append",
[](WritableFile* self, absl::string_view data) {
py::gil_scoped_release release;
const auto status = self->Append(data);
tensorflow::MaybeRaiseRegisteredFromStatusWithGIL(status);
})