Help needed to solve issue with udns

Narendra Kumar S.S ssnkumar at gmail.com
Fri Jul 13 22:52:38 MSK 2012


Hi,

I have written a multi threaded application.
I have 8 network threads and one dns thread.
DNS thread is using epoll_wait to wait for event.

Now, I am doing dns_init() in the main function and adding the fd to the
epoll in the network thread.
So, the sequence is, first dns_init() is done and after that worker thread
starts and the fd gets registered with epoll of worker thread.
After this, epoll_timeouts() is called and the worker threads starts the
wait for using epoll_wait().
After this network threads start and they wait to get the domain name to
resolve.
When the domain name is given, I am calling dns_submit_p() call the get the
A records.
But, when I submit the query, the epoll of worker thread is not getting
woken up.

Now, if instead of adding the fd in the worker thread, if I add it in the
network thread itself, then the worker thread gets the event.

I looked into the code of udns. But, I could not identify the problem.

Can you please help me resolve this issue?.

Warm Regards,
Narendra

Visit my blogs at:
http://ssnarendrakumar.blogspot.com/
   ___    ___    __    _
  /  __/  /  __/  /     | / /
_\   \   _ \   \   /   /| |/ /
\___/ \___/   /_/ |__/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.corpit.ru/pipermail/udns/attachments/20120714/bc59a0d0/attachment.html>


More information about the udns mailing list