[Ndn-interest] Is there multithreading in NDN/

lxzhao at njnet.edu.cn lxzhao at njnet.edu.cn
Sun Dec 10 19:20:15 PST 2017

  Sorry for this late reply.
  Thank you for your earlier reply and it really works.Now I have achieved
my goal.
  Thank you very much!
                                                              Lixia Zhao

> (moving this thread to ndn-lib mailing list as it is a library question)
> Hi Lixia Zhao
> 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.
> 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.
> Yours, Junxiao
> On Wed, Dec 6, 2017 at 3:33 AM, <lxzhao at njnet.edu.cn> wrote:
>> Hello,
>>   I want to realize both Consumer(send Interests periodically) and
>> Producer(reply a Data whenever receiving an Interest) in only one node.
>>   I had intended to use the multithreading mechaism in C++ and create
>> two
>> thread,one for Consumer and the other for Producer.But someone told me
>> that there are built-in multithreading mechaism in the underlying
>> libraries of NDN,like in CCNx,using the "Face::processEvents( )" of
>> ndn-cxx.But I think it is just a function to call corresponding
>> callbacks when receiving a Data,an Interest,Nack or other data.
>>   I had read the document of ndn-cxx and cannot find information about
>> multithreading.
>>   So whether there are in-built multithreading mechanism in NDN.If
>> yes,where can I get the information about it?
>>   Thank you!
>>                                                                   regards,
>>                                                                  Lixia
>> zhao

More information about the Ndn-interest mailing list