Thread.Resume Metoda

Definicja

Przestroga

Thread.Resume has been deprecated. Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources. https://go.microsoft.com/fwlink/?linkid=14202

Przestroga

Thread.Resume has been deprecated. Use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.

Przestroga

Thread.Resume has been deprecated. Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources. http://go.microsoft.com/fwlink/?linkid=14202

Wznawia wątek, który został zawieszony.

public:
 void Resume();
[System.Obsolete("Thread.Resume has been deprecated.  Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.  https://go.microsoft.com/fwlink/?linkid=14202", false)]
public void Resume ();
[System.Obsolete("Thread.Resume has been deprecated. Use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.")]
public void Resume ();
[System.Obsolete("Thread.Resume has been deprecated.  Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.  http://go.microsoft.com/fwlink/?linkid=14202", false)]
public void Resume ();
public void Resume ();
[<System.Obsolete("Thread.Resume has been deprecated.  Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.  https://go.microsoft.com/fwlink/?linkid=14202", false)>]
member this.Resume : unit -> unit
[<System.Obsolete("Thread.Resume has been deprecated. Use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.")>]
member this.Resume : unit -> unit
[<System.Obsolete("Thread.Resume has been deprecated.  Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources.  http://go.microsoft.com/fwlink/?linkid=14202", false)>]
member this.Resume : unit -> unit
member this.Resume : unit -> unit
Public Sub Resume ()
Atrybuty

Wyjątki

Tylko platformy .NET Core i .NET 5+: we wszystkich przypadkach.

Wątek nie został uruchomiony, jest martwy lub nie znajduje się w stanie wstrzymania.

Obiekt wywołujący nie ma odpowiedniego SecurityPermissionelementu .

Uwagi

Przestroga

Nie należy używać Suspend metod i Resume do synchronizowania działań wątków. Nie wiesz, jaki kod jest wykonywany przez wątek po jego zawieszeniu. Jeśli zawiesisz wątek, gdy będzie on blokowany podczas oceny uprawnień zabezpieczeń, inne wątki w programie AppDomain mogą być zablokowane. Jeśli wstrzymujesz wątek podczas wykonywania konstruktora klasy, inne wątki w AppDomain tej próbie użycia tej klasy są blokowane. Zakleszczenia mogą wystąpić bardzo łatwo.

Dotyczy

Zobacz też