grazie alle vostre indicazioni ho inserito il seguente codice in OnStart:
quindi a parte ho il mio worker thread:Codice PHP:
Protected Overrides Sub OnStart(ByVal args() As String)
Dim workerThread = New Thread(New ThreadStart(AddressOf ServiceWorkerMethod))
workerThread.Start()
End Sub
Funziona correttamente ma non mi ripete le istruzioni nel ciclo, come mai?Codice PHP:
Public Sub ServiceWorkerMethod()
Do
...codice
Loop
End Sub