Link to home
Start Free TrialLog in
Avatar of bhermer
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:


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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of cuziyq
cuziyq

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bhermer
bhermer

ASKER

Fantastic, the answer I needed, me not worrying and letting a smarter system than mine do the work is the way I like it, thanks