[Nfd-dev] thread safety of ndn::face::expressInterest()

Davide Pesavento davide.pesavento at lip6.fr
Wed Jan 21 12:37:27 PST 2015


But doesn't this mean that all calls depending on io_service (e.g.
network operations) are effectively single-threaded?

Best,
Davide

On Wed, Jan 21, 2015 at 9:17 PM, Alex Afanasyev
<alexander.afanasyev at ucla.edu> wrote:
> Hi Shuo,
>
> There shouldn’t be problem expressing interests (or do any other job) with ndn-cxx within multiple threads.  However, there is a strong requirement that Face::processEvents (or io_service::run) is called exactly once in some thread (doesn’t really matter which one).
>
> The library will ensure that interests expressed from different threads are properly synchronized/serialized.
>
>> Alex
>
>> On Jan 21, 2015, at 7:05 AM, Shuo Chen <chenatu2006 at gmail.com> wrote:
>>
>> Hi everyone,
>>
>> I was trying to express interests in multi threads. Is ndn::face::expressInterest() thread-safe? Besides, which components of ndn-cxx are thread-safe and which are not?
>>
>> ----
>> Shuo Chen
>> Tsinghua University
>
>
> _______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>




More information about the Nfd-dev mailing list