I do not fully understand what the STATHREAD attribute does http://msdn.microsoft.com/en-us/library/system.stathreadattribute.aspx. Please see the code below:
Imports Project1
Imports System.Threading
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim t1 As New Thread(AddressOf PersonTest.Test2)
Dim t2 As New Thread(AddressOf PersonTest.Test2)
Dim t3 As New Thread(AddressOf PersonTest.Test2)
t1.Name = "Test1"
t2.Name = "Test2"
t3.Name = "Test3"
t1.Start()
t2.Start()
t3.Start()
End Sub
End Class
The code explicitly creates three threads, so there are four threads in total i.e. the main thread, t1,t2 and t3.
Is the STATHREAD required for a Windows Form app that has one thread i.e. the main threads?