Replies: 1 comment
-
Asking in discord instead. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋
I'm new to nng. I'd like to know if the sockets in nng are thread-safe. Here's a simple surveyor/respondent client/server setup. The server is written in go with mangos and the client is in Python with pynng.
server.go
client.py
I'm getting a lot of
pynng.exceptions.Canceled: Operation canceled
(about half out of the 10000 requests). When I ran the requests in serial, everything is fine so I assume the error was b/c of running the requests in a multithreading environment?I know I don't have to use multithreading but I'm doing a POC for using nng to write a client which can be run in a multithreaded environment (e.g., gunicorn gthread with 1+ threads). Previously I'm using ZMQ's DEALER-ROUTER sockets but it was clear in ZMQ's documentation that the socket isn't thread-safe. Someone suggested me to take a look at nanomsg and nng which are thread-safe.
Is there anything I'm missing? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions