From b31e24505cc22ea40ad9d287ecd956b077527494 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:03:27 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- helper/ZeroMQ/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/helper/ZeroMQ/README.md b/helper/ZeroMQ/README.md index 2cc6dc6..597ab53 100644 --- a/helper/ZeroMQ/README.md +++ b/helper/ZeroMQ/README.md @@ -141,5 +141,18 @@ Output: (100, 10) ``` +## Non-blocking + +There is this option to receive packages in a non blocking way: + +```python + confirm = False + while not confirm: + try: + packet_in = socket.recv_pyobj(zmq.NOBLOCK) + confirm = True + except zmq.error.Again: + pass +```