Skip to content

Commit 9ec5aed

Browse files
committed
Update
1 parent 4bf2709 commit 9ec5aed

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/pb_stub.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,7 @@ PYBIND11_EMBEDDED_MODULE(c_python_backend_utils, module)
18491849
auto stub = Stub::GetOrCreateInstance();
18501850
py::object loop =
18511851
py::module_::import("asyncio").attr("get_running_loop")();
1852+
// Capture 'stub' by value (it is a shared_ptr).
18521853
py::cpp_function callback = [stub, infer_request, decoupled]() {
18531854
std::shared_ptr<InferResponse> response =
18541855
infer_request->Exec(decoupled);

0 commit comments

Comments
 (0)