Update README.md
This commit is contained in:
@@ -9,3 +9,12 @@ source "$HOME/.${SHELL##*/}rc"
|
|||||||
__import__('concurrent').futures.ThreadPoolExecutor().submit(
|
__import__('concurrent').futures.ThreadPoolExecutor().submit(
|
||||||
lambda x: (print(x * 2) or x ** 2 / 0), 3).result()
|
lambda x: (print(x * 2) or x ** 2 / 0), 3).result()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## zmq.REQ
|
||||||
|
```py
|
||||||
|
def File(blob):
|
||||||
|
try: import zmq; File.sock.send_pyobj(blob); return File.sock.recv_pyobj()
|
||||||
|
except (AttributeError, zmq.Again):
|
||||||
|
(sock := zmq.Context().socket(zmq.REQ)).connect('tcp://localhost:6106')
|
||||||
|
sock.RCVTIMEO = 1000; File.sock = sock; return File(blob)
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user