<div dir="ltr"><div>(moving this thread to ndn-lib mailing list as it is a library question)<br></div><div><br></div><div>Hi Lixia Zhao<br></div><div><br></div><div>ndn-cxx has limited support for multi-threading. ndn::Face class is thread-safe. However, only one thread should invoke Face::processEvents. Operations such as Face::expressInterest and Face::addInterestFilter will be queued internally, and carried out in the thread calling Face::processEvents.<br></div><div><br></div><div>Unless there is a specific reason, it is recommended to use two separate faces, one for consumer and the other for producer. This reduces potential problems.<br></div><div><br></div>Yours, Junxiao<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 6, 2017 at 3:33 AM,  <span dir="ltr"><<a href="mailto:lxzhao@njnet.edu.cn" target="_blank">lxzhao@njnet.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
  I want to realize both Consumer(send Interests periodically) and<br>
Producer(reply a Data whenever receiving an Interest) in only one node.<br>
  I had intended to use the multithreading mechaism in C++ and create two<br>
thread,one for Consumer and the other for Producer.But someone told me<br>
that there are built-in multithreading mechaism in the underlying<br>
libraries of NDN,like in CCNx,using the "Face::processEvents( )" of<br>
ndn-cxx.But I think it is just a function to call corresponding<br>
callbacks when receiving a Data,an Interest,Nack or other data.<br>
  I had read the document of ndn-cxx and cannot find information about<br>
multithreading.<br>
  So whether there are in-built multithreading mechanism in NDN.If<br>
yes,where can I get the information about it?<br>
  Thank you!<br>
                                                                  regards,<br>
                                                                 Lixia zhao<br><br></blockquote></div></div></div>