Eilev
Eilev

Reputation: 273

Asp.net C#: Check if other threads are running in thread

I'm making a thread that will trigger a change of files in App_GlobalResources, which again will cause the application to recompile, which will abort all other possible running threads. I need to make this thread that will abort the other threads to wait until all other threads are not running. I have registered all threads in (Hashtable)Application["ThreadList"], but I don't seem to be able to access Application from Threads. Any ideas?

Upvotes: 1

Views: 606

Answers (1)

Jakub Konecki
Jakub Konecki

Reputation: 46008

As far as I know ASP.NET doesn't abort currently running worker threads before it recompiles. It starts queuing up requests and waits for the existing requests to finish processing before it restarts AppDomain.

Update:

If your resources change daily than they shouldn't be hard-coded in resx files. Create a new resource provider that loads them from database or external files.

Upvotes: 2

Related Questions