fixed inference bugs

add DONE during inference, correct handling on C# side
This commit is contained in:
Alex Bezdieniezhnykh
2025-02-01 02:09:11 +02:00
parent e7afa96a0b
commit 739759628a
23 changed files with 324 additions and 95 deletions
+4 -1
View File
@@ -1,8 +1,10 @@
import time
import zmq
from threading import Thread, Event
from remote_command cimport RemoteCommand
cimport constants
cdef class RemoteCommandHandler:
def __init__(self, object on_command):
self._on_command = on_command
@@ -59,8 +61,9 @@ cdef class RemoteCommandHandler:
socket.send_multipart([client_id, data])
print(f'{len(data)} bytes was sent to client {client_id}')
cdef close(self):
cdef stop(self):
self._shutdown_event.set()
time.sleep(0.5)
self._router.close()
self._dealer.close()
self._context.term()