[zeromq-dev] Delete czmq socket?

Pieter Hintjens ph at imatix.com
Mon Mar 17 16:59:26 CET 2014


Great to know that it works :-)

On Mon, Mar 17, 2014 at 4:29 PM, Turkey Breast <turkeybreast at yahoo.com> wrote:
> Thanks, I feel stupid. Fixes the problem.
>
>
> On Monday, March 17, 2014 3:47 PM, Pieter Hintjens <ph at imatix.com> wrote:
> You can delete sockets explicitly using zsocket_destroy(). That should
> in theory really delete the socket.
>
> On Mon, Mar 17, 2014 at 3:16 PM, Turkey Breast <turkeybreast at yahoo.com>
> wrote:
>> How can I force to delete a czmq socket? I'm hitting max sockets creation
>> limit.
>>
>> I have multiple threads returning data so I queue it using a push/pull
>> inproc queue, which wakes up the main poller and then forwards it onto the
>> main TCP socket. Each time a thread returns a result, I spawn a new
>> socket,
>> If this is not a good way to do things then I can replace this piece of
>> code
>> with a lockless_queue that I made:
>>
>> https://github.com/spesmilo/obelisk/blob/master/src/worker/worker.cpp#L26
>>
>> Or can I use the ZMQ API with zctx_t->context or is that not recommended?
>>
>> Should I not be using sockets for this sort of thing?
>>
>> Thanks
>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list