Patrick Twohig
Patrick Twohig
I've never had any success sharing a socket between two (or more) threads. Which, I'm assuming you're doing using that generic object pool.
If you look at the source for Socket, I think the error state is handed through a ThreadLocal and there's not really any logic in there to transfer that from...
> No, there was no sharing of sockets between pools. At the same time, or ever?
'cause I tried doing something like this: 1. Thread 1: Checks a java.util.ConcurrentQueue (the non-blocking variety), if empty create a socket 1. Thread 1: Perform Work using Socket 1. Thread...
> Reusing the socket on a different thread should be no issue. That was what we were doing all the time. Yeah, that's where I ran into issues :-/
> JeroMq uses a counter to prevent you from using too many sockets and kill the system, which is good, but that counter is not protected from race conditions, which...
ZeroMQ also uses the Curve25519 and being able to generate the keys would be helpful to me as well.