req

pyzmq REQ/REP with asyncio await for variable

好久不见. 提交于 2021-02-08 09:12:20
问题 I'm playing for the first time with asyncio in python and trying to combine it with ZMQ. Basically my issue is that I have a REP/REQ system, in an async def with a function I need to await. how the value is not updated. Here's a snippet of the code to illustrate that: #Declaring the zmq context context = zmq_asyncio.Context() REP_server_django = context.socket(zmq.REP) REP_server_django.bind("tcp://*:5558") I send this object to a class and get it back in this function async def readsonar