Does a thread close automatically?

前端 未结 7 1274
萌比男神i
萌比男神i 2021-01-01 10:49

Im using a gmail class so that my app can send me notification over gmail.

Its done like this:

public static void SendMessage(string message)
{
    N         


        
7条回答
  •  暖寄归人
    2021-01-01 11:25

    The thread needs to be started once - at which point it will execute the code block assigned to it and exit.

    You don't need to explicitly clean up the thread in most cases (unless you want to bail out early for example )

提交回复
热议问题