|
-
Feb 2nd, 2004, 02:18 AM
#1
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....
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Feb 2nd, 2004, 02:57 AM
#2
yay gay
maybe it's because b get's a value that's just too high and an error is thrown? When you're using multi threads this kind of exceptions many of the times aren't thrown up but they still ocurr.
\m/  \m/
-
Feb 2nd, 2004, 05:03 PM
#3
Originally posted by PT Exorcist
maybe it's because b get's a value that's just too high and an error is thrown? When you're using multi threads this kind of exceptions many of the times aren't thrown up but they still ocurr.
hmm so that has to do with multithreading?
is this something official that multithreaded apps dont throw all the errors? cuz it doesnt make sense to me
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|