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 applicati开发者_Go百科on 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?
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.
精彩评论