richardschneider / net-mdns

Simple multicast DNS
MIT License
227 stars 79 forks source link

Unadvertise a service Takes long time to Release Resources #80

Open Raj123456788 opened 4 years ago

Raj123456788 commented 4 years ago

I can see the Threads being still running and being stopped one by one. I have created 2 buttons for Publish & unpublish. It works fine for the first time if I publish or Unpublish. But if I publish again it takes time to publish. What might be the reason?

richardschneider commented 4 years ago

What do you mean by Publish? Can you point to your code?

This library uses Tasks and threads are only used indirectly by the task subsystem. My understanding is that Tasks use a cache of threads, so you will not see threads being disposed.

The key resource are the network sockets.