You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we're not careful to dispose the ZmqSockets created and the ZmqContext goes out of scope, the finalizer thread is stuck forever. The documentation says that we're supposed to use a non-default Linger setting to make sure sockets would not stay blocked, but even with that option I'm still unable to avoid the blocking on the finalizer.
Hi,
If we're not careful to dispose the ZmqSockets created and the ZmqContext goes out of scope, the finalizer thread is stuck forever. The documentation says that we're supposed to use a non-default Linger setting to make sure sockets would not stay blocked, but even with that option I'm still unable to avoid the blocking on the finalizer.
A simple repro is here:
var context = ZmqContext.Create();
var socket = context.CreateSocket(SocketType.PUB);
socket.Identity = Guid.NewGuid().ToByteArray();
socket.Linger = TimeSpan.FromSeconds(1);
socket.TcpKeepalive = TcpKeepaliveBehaviour.Enable;
context = null;
GC.Collect();
GC.WaitForPendingFinalizers();
The text was updated successfully, but these errors were encountered: