[Nfd-dev] Setting up multiple interests.

Alex Afanasyev alexander.afanasyev at ucla.edu
Tue Mar 18 16:13:16 PDT 2014


Hi Obaid,

There is no problem of having multiple setInterestFilters on the same face and calling shutdown.  Unless you explicitly use boost::thread, everything is executed on a single stream and you would not have any problems.  Even if you use boost::thread, you shouldn't have problems, as all operations are serialized, though I'm not 100% confident with shutdown call.

In any case, if shutdowning the face when any of the setInterestFilter failed is the desired behavior, don't worry about it. It should work and you don't need to use multiple faces.

---
Alex

On Mar 18, 2014, at 1:25 PM, Syed Obaid Amin <obaidasyed at gmail.com> wrote:

> Hello All, 
> 
> I was setting up multiple interest filters in an application. If an interest filter cannot be setup on any one of them then my feeling is the application should quit by calling face.shutdown. However, doing so may not result in graceful shutdown and can cause segmentation faults, as the other interest filter that was successfully set, might be in the middle of some processing. My question is how to handle such scenarios in a reasonable way? 
> 
> One solution might be is to bind one interest filter to one face only but then both faces should be a part of the event loop. Otherwise, we can also print warnings instead of calling shutdown, but I don't think users pay attentions to warnings that much. 
> 
> I'll appreciate any suggestion in this regard. 
> 
> Thanks,
> Obaid 
> _______________________________________________
> 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