[Pdns-dev] receiver-threads

David Hawthorne dhawth at 3crowd.com
Wed May 12 19:53:29 CEST 2010


In common_startup.cc:

        pthread_t qtid;

        for(int n = 0; n < ::arg().asNum("receiver-threads"); ++n)
        {
                pthread_create(&qtid, 0, qthread, reinterpret_cast<void *>(n));        // receives packets
        }

        void *p;
        pthread_join(qtid, &p);

        L << Logger::Error << "Mainthread exiting - should never happen" << endl;

With only one qtid, pthread_join will always act on the last thread created, and exit if just that one thread dies.  I'm guessing this is why pdns.conf doesn't document the receiver-threads option?  Or are there other issues with this option?


More information about the Pdns-dev mailing list