LoginSignup
0
0

More than 5 years have passed since last update.

Parallel クラスの使いかたメモ

Posted at

Parallel.Invoke.vb
Sub L()
'proc1
End Sub

Sub M()
'proc2
End Sub

Sub N()
'proc3
End Sub

Parallel.Invoke(L, M, N)
Parallel.For.vb
Parallel.For(0, N, Function(i) 
                       Console.WriteLine(i + i)
                   End Function)

' - OR -

Sub QQQ()
'proc
End Sub

Parallel.For(0, N, AddressOf QQQ)

Parallel.ForEach.vb
Dim data = Enumerable.Range(0, N)
Parallel.ForEach(data, Function(x) 
                           Console.WriteLine(x + x)
                       End Function)
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0