<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
Hi All,</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
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 - </div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<span style="font-family: 'luxi sans', sans-serif; font-size: medium; text-align: -webkit-left; "><i>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.</i></span></div>
<br>
<div><font face="Helvetica">The questions I had are - </font></div>
<div><font face="Helvetica"><br>
</font></div>
<ol>
<li><font face="Helvetica">What is the lifetime of a backend thread?</font></li><li><font face="Helvetica">How often does a thread get destroyed and a new  thread get created?</font></li><li><font face="Helvetica">Is there any interface available to do a cleanup before the thread ends?</font></li></ol>
<div><font face="Helvetica">Thanks,</font></div>
<div><font face="Helvetica">Seema</font></div>
</body>
</html>