(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Change Thread Priority
Imports System.Threading
Imports System.Threading.ThreadPriority
Module Module1
Sub TaskA()
Dim I As Integer
For I = 0 To 250
System.Console.Write("A")
Next
End Sub
Sub TaskB()
Dim I As Integer
For I = 0 To 250
System.Console.Write("B")
Next
End Sub
Sub TaskC()
Dim I As Integer
For I = 0 To 250
System.Console.Write("C")
Next
End Sub
Sub Main()
Dim A As Thread = New Thread(AddressOf TaskA)
Dim B As Thread = New Thread(AddressOf TaskB)
Dim C As Thread = New Thread(AddressOf TaskC)
A.Priority = BelowNormal
C.Priority = AboveNormal
A.Start()
B.Start()
C.Start()
End Sub
End Module
CCCCCCCCCCCCCCCCCBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"