app terminates after a few mins
I'm using this code to make my processor usage go to 100% (testing something with CPU temp)... the code is random, doesn't make sense anyways, I'm just including it for reference:
VB Code:
Imports System.Threading
Module Module1
Sub main()
Dim t1, t2 As Thread
t1 = New Thread(AddressOf foo)
t2 = New Thread(AddressOf foo)
t1.Start()
t2.Start()
End Sub
Sub foo()
Dim i As Integer
Dim b As Double
Do
For i = 0 To Integer.MaxValue
b = (i ^ 2) - i
Next
Loop
End Sub
End Module
I have a p4, 3ghz hyperthreaded, 1gb ram.... I run this and after about 7 mins the program just shuts down without any messages or anything showing up. It just dissapears from task manager. This is a bit abnormal to me and I was just wondering if you've seen something like this happen. I'm running this on winXP btw....