asp.net threads: attributable to the user that started them
<p>(asp.net 2.0, C#)</p>

<p>I need to implement threading that will be:</p>

<ol>
<li>Attributable to the user that started the thread (e.g. on a callback, I could use an ID or the name of a thread to look up the thread that the user previously started). </li>
<li>If the thread is finished, the callback should be able to look up the thread and know it is finished. </li>
<li>Finally, the thread would need to automatically terminate if it is active for, say, more than a minute.</li>
</ol>

<p>I've read quite a bit and I now know that I need to personally manage the threads (e.g. I can't use the asp.net thread pool) because of requirement (1) I listed above. I notice that the Thread class in C# has an ID property; can that ID be used to implement requirement (1) (I don't know if that ID will always be unique, etc)? </p>

<p>Btw, I understand that asp.net can terminate threads at certain points. Basically, any time the user's Session is wiped out, my thread is useless anyway. If the thread does fail or does get terminated for whatever reason, that's fine because the task will be restarted. Mostly I'm concerned with finding some way where the user can look up the thread that was started .. can this be accomplished by storing the ID property in Session? Also, if so, how do I go about using that property to actually find the thread? If not, what is the recommended way to do what I'm asking. Thanks.</p>
