Prevent worker process from recycling when foreground thread is executing.

M

Marcel van den Hof

Dear all,

Is there any way to prevent the ASP.NET worker process from recycling
the worker process when a thread is being executed on the foreground
(IsBackground=false).

I'd also like to know if there a way for a foreground thread to detect
if the worker process is being recycled?

It seems that when a worker process recycles (under IIS 5.0) a thread
simply gets killed and there is no way for the thread to find that
out.

Thanks for your help everyone.

Kind regards,

Marcel van den Hof
 
M

Marcel van den Hof

I appreciate your response Steven.

I completely understand that using a Windows Service would not cause
threads to be terminated unexpectedly.

However I am still interested in understanding the precise behaviour
of how the worker process recycles a thread with the IsBackground
property set to true. (and how to prevent this or pick this up in the
thread)

Thanks for your input.

Kind regards,

Marcel van den Hof
 
B

Bruce Barker

when a recyle happens, the asp.net worker process actually exits, thus
killing all threads and releasing all memory (managed or unmanged). the
point of a recycle is to recover from runaway thread or memory leaks.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top