From 9e14f9b606cd884d8062cebf7315ca25657caa80 Mon Sep 17 00:00:00 2001 From: Yingge He Date: Wed, 18 Sep 2024 05:03:18 -0700 Subject: [PATCH] Release GIL --- src/metric.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/metric.cc b/src/metric.cc index 7796b161..4c055910 100644 --- a/src/metric.cc +++ b/src/metric.cc @@ -167,6 +167,7 @@ Metric::SendCreateMetricRequest() void Metric::SendIncrementRequest(const double& value) { + py::gil_scoped_release release; try { CheckIfCleared(); std::unique_ptr& stub = Stub::GetOrCreateInstance(); @@ -204,6 +205,7 @@ Metric::SendSetValueRequest(const double& value) void Metric::SendObserveRequest(const double& value) { + py::gil_scoped_release release; try { CheckIfCleared(); std::unique_ptr& stub = Stub::GetOrCreateInstance();