Thread.Resume Méthode

Définition

Attention

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

Attention

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

Attention

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

Reprend un thread qui a été suspendu.

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

Exceptions

.NET Core et .NET 5 (et versions ultérieures) uniquement : Dans tous les cas.

Le thread n’a pas été démarré, est inactif ou n’est pas dans l’état interrompu.

L’appelant ne possède pas le SecurityPermission nécessaire.

Remarques

Attention

N’utilisez pas les Suspend méthodes et Resume pour synchroniser les activités des threads. Vous n’avez aucun moyen de savoir quel code un thread est en cours d’exécution lorsque vous le suspendez. Si vous suspendez un thread pendant qu’il contient des verrous lors d’une évaluation d’autorisation de sécurité, d’autres threads du AppDomain peuvent être bloqués. Si vous suspendez un thread pendant qu’il exécute un constructeur de classe, les autres threads du AppDomain qui tentent d’utiliser cette classe sont bloqués. Des interblocages peuvent se produire très facilement.

S’applique à

Voir aussi