Update README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
70db6e7b37
commit
b31e24505c
1 changed files with 13 additions and 0 deletions
|
@ -141,5 +141,18 @@ Output:
|
||||||
(100, 10)
|
(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
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue