Hello Seema, On Nov 7, 2013, at 6:19 , Seema Datar wrote:
> We have a use case where we use PDNS with 8 backend threads. We needed to > save thread specific data in an mmap. However, I came across the following in > PDNS documentation - > > PowerDNS may instantiate multiple instances of your backend, or destroy > existing copies and instantiate new ones. Backend code should therefore be > thread-safe with respect to its static data. Additionally, it is wise if > instantiation is a fast operation, with the possible exception of the first > construction. > > The questions I had are - > > • What is the lifetime of a backend thread? Sometimes, only one query. > • How often does a thread get destroyed and a new thread get created? Some threads will live for a long time. Some other threads will come and go quickly. > • Is there any interface available to do a cleanup before the thread > ends? Yes - the class destructor. Look at GeoBackend::~GeoBackend() or LUABackend::~LUABackend() for an example. By the way, please keep these posts confined to the pdns-dev list. Kind regards, -- Peter van Dijk Netherlabs Computer Consulting BV - http://www.netherlabs.nl/
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Pdns-dev mailing list [email protected] http://mailman.powerdns.com/mailman/listinfo/pdns-dev
