openvino: fix ov.Tensor.data race condition

This commit is contained in:
Koushik Dutta
2024-12-31 12:44:38 -08:00
parent a41e915f69
commit c19ec63f98
3 changed files with 4 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/openvino",
"version": "0.1.150",
"version": "0.1.152",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/openvino",
"version": "0.1.150",
"version": "0.1.152",
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
}

View File

@@ -48,5 +48,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.1.150"
"version": "0.1.152"
}

View File

@@ -250,6 +250,7 @@ class OpenVINOPlugin(
def callback(infer_request, future: asyncio.Future):
try:
output = infer_request.get_output_tensor(0).data
output = np.copy(output)
self.loop.call_soon_threadsafe(future.set_result, output)
except Exception as e:
self.loop.call_soon_threadsafe(future.set_exception, e)