J
James T
Hi
I am considering spawning a background thread to perform a long running
task in my asp.net application and I was hoping someone could shed some
light on several issues for which I have not been able to find solid
answers.
Will the spawned thread be terminated prematurely when the originating
request thread is returned to the thread pool or the worker process
recycles? If it is terminated when the request completes, why have a
background thread at all? Why not simply redirect the user without
terminating the execution of the current request? If it isn't, then it
is conceivable that it could serve a similar request which would then
yet create another thread and I could end up with a large number of
threads. Will these threads impact negatively (other than general server
load) on other requests? If the thread is terminated when the wp
recycles, how can background threads be used reliably?
James
(threading noob)
I am considering spawning a background thread to perform a long running
task in my asp.net application and I was hoping someone could shed some
light on several issues for which I have not been able to find solid
answers.
Will the spawned thread be terminated prematurely when the originating
request thread is returned to the thread pool or the worker process
recycles? If it is terminated when the request completes, why have a
background thread at all? Why not simply redirect the user without
terminating the execution of the current request? If it isn't, then it
is conceivable that it could serve a similar request which would then
yet create another thread and I could end up with a large number of
threads. Will these threads impact negatively (other than general server
load) on other requests? If the thread is terminated when the wp
recycles, how can background threads be used reliably?
James
(threading noob)