Tutorials Infos - Anleitungen - Hilfe - Dreamcodes
 

Threads

Threads:

Module threads
Sub main()
Dim t1 As Threading.Thread
Dim t2 As Threading.Thread
Dim t3 As Threading.Thread
t1 = New Threading.Thread(AddressOf laufA)
t2 = New Threading.Thread(AddressOf laufB)
t3 = New Threading.Thread(AddressOf laufC)
t1.Start() : t2.Start() : t3.Start()
t1.Join() : t2.Join() : t3.Join()
End Sub
Sub laufA()
Dim i As Integer
For i = 0 To Integer.MaxValue
If 0 = i Mod 10000 Then
Console.Write("X")
End If
Next
End Sub
Sub laufB()
Dim i As Integer
For i = 0 To Integer.MaxValue
If 0 = i Mod 10000 Then
Console.Write("I")
End If
Next
End Sub
Sub laufC()
Dim i As Integer
For i = 0 To Integer.MaxValue
If 0 = i Mod 10000 Then
Console.Write("_")
End If
Next
End Sub
End Module

 
ID: 1928
eingestellt am: 25.01.2010
Autor: Keine Angabe
Status zum lesen: Gast
gelesen: 6113
Webseite: www.dreamcodes.com
[Drucken]