[zeromq-dev] Does the zeromq support the spin_lock internally?

Richard Zhang rzhang at a10networks.com
Wed Mar 14 19:53:48 CET 2012


Hi there,

 

When I took a look at the source codes, it shows the ctx_t class
implementation uses the pthread mutex locking mechanism.  In general, it
works fine in many applications.   For the SMP architecture, the system runs
the multicore and each worker thread can acquire the CPU to run for the
completeness at the same time.  If use the Zeromq for the "inproc"
communication, the inter-thread transport doesn't need the I/O thread, and
all messages are in the memory.   It's nice to have the spin_lock
implemented inside the Zeromq, instead of pthread mutex for this situation.
It can reduce the context switch to cause the performance penality.  Do you
have any idea to work around or plan to support it?  Thanks.

 

-Richard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120314/8c2882c2/attachment.htm>


More information about the zeromq-dev mailing list