mirror of
https://github.com/tensorflow/tensorflow.git
synced 2026-10-26 00:09:51 +08:00
Release GIL during append calls, similar to the other calls. Otherwise, one might encounter performance issues.
PiperOrigin-RevId: 1005039469
This commit is contained in:
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);
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user