Skip to content

How to actually handle a graceful close? #254

Description

@thxrben

I have a while-loop which is receiving via socket->receive(message);.

I call another function inside the same class (but from a different thread) which tells the while loop to end.
Additonally, I have to close the sockets so the term/destroy on the context is not erroring out.

After both socket operations, I just get "Ressource temporarily unavailable".
Why is that?
The sockets gets bound to the same endpoint, but cannot be closed?

Of course, in the other Thread its still running socket->receive(message), but that one should stop once I call zmq_ctx_term() according to the docs.

TLDR;: How do I actually close zmqpp gracefully from another thread?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions