Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,26 @@
Imports System.Threading
Module Module1
Public rnd As New Random
Sub Main()
Dim t1 As New Thread(AddressOf Foo)
Dim t2 As New Thread(AddressOf Foo)
Dim t3 As New Thread(AddressOf Foo)
t1.Start("Enjoy")
t2.Start("Rosetta")
t3.Start("Code")
t1.Join()
t2.Join()
t3.Join()
End Sub
Sub Foo(ByVal state As Object)
Thread.Sleep(rnd.Next(1000))
Console.WriteLine(state)
End Sub
End Module

View file

@ -0,0 +1,9 @@
Imports System.Threading
Module Module1
Dim rnd As New Random()
Sub Main()
Parallel.ForEach("Enjoy Rosetta Code".Split(" "), Sub(s)
Thread.Sleep(rnd.Next(25)) : Console.WriteLine(s)
End Sub)
End Sub
End Module