Thread.Resume Método

Definição

Cuidado

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

Cuidado

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

Cuidado

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

Retoma um thread que foi suspenso.

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 ()
Atributos

Exceções

Somente .NET Core e .NET 5+: Em todos os casos.

O thread não foi iniciado, está inativo ou não está no estado suspenso.

O chamador não tem o SecurityPermission apropriado.

Comentários

Cuidado

Não use os Suspend métodos e Resume para sincronizar as atividades de threads. Você não tem como saber qual código um thread está executando quando o suspende. Se você suspender um thread enquanto ele mantém bloqueios durante uma avaliação de permissão de segurança, outros threads no AppDomain poderão ser bloqueados. Se você suspender um thread enquanto ele estiver executando um construtor de classe, outros threads na AppDomain tentativa de usar essa classe serão bloqueados. Deadlocks podem ocorrer muito facilmente.

Aplica-se a

Confira também