Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Thread issue/leak?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Chris Botha, post: 472953"] I am creating a worker thread from inside an aspx page and the thread does the stuff it should do, no problem. However, I have noticed running it in the debugger that it seems as if the threads are not killed/garbage-collected after a thread terminates. I have a breakpoint in the thread itself and every time it breaks, in the Threads window I observe the new thread, but the previous thread is still there as well. The exact same code in a windows app performs as expected, on every break there are two threads, the main thread and the current worker thread. The simplified code below also gives the same results, so nothing strange in the thread itself. If I put the code in a loop of 2000 cycles and break after the last, then there are 2000 worker threads displayed in the Threads window. Dim ttt As Thread = New Thread(AddressOf TheThreadProc) ttt.ApartmentState = Threading.ApartmentState.STA ttt.Start() ttt.Join() And the simple thread: Private Sub TheThreadProc() Dim iii As Integer = 10 End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Thread issue/leak?
Top