bhermer
asked on
Multi threading with a QUAD CORE CPU
Hi,
I am using simple threading to spawn Html parsing algorithiums from a class file, my question is, will a new thread automatically be assigned to an unused core in a quad core system? if I spawn 4 threads within say 500ms, and each has an execution time of 1000ms, will the oporating system manage the cpu assignment in the best way, or is there something else I should be doing?
Below is my threading code simplified:
I am using simple threading to spawn Html parsing algorithiums from a class file, my question is, will a new thread automatically be assigned to an unused core in a quad core system? if I spawn 4 threads within say 500ms, and each has an execution time of 1000ms, will the oporating system manage the cpu assignment in the best way, or is there something else I should be doing?
Below is my threading code simplified:
Imports System.Threading
Module HtmlParcer
Sub ParseSite1(ByVal sHtml As String)
Dim oThread As New ParseThreadClass
oThread.sHtml = sHtml
Dim t As New Thread(AddressOf oThread.ParseThread1)
t.Start()
End Sub
Public Class ParseThreadClass
Public sHtml As String
Public Sub ParseThread1()
'### DO SOMETHING
End Sub
End Class
End Module
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER