Stream.Synchronized(Stream) Méthode

Définition

Crée un wrapper thread-safe (synchronisé) autour de l’objet Stream spécifié.

public:
 static System::IO::Stream ^ Synchronized(System::IO::Stream ^ stream);
public static System.IO.Stream Synchronized (System.IO.Stream stream);
static member Synchronized : System.IO.Stream -> System.IO.Stream
Public Shared Function Synchronized (stream As Stream) As Stream

Paramètres

stream
Stream

Objet Stream à synchroniser.

Retours

Objet Stream thread-safe.

Exceptions

stream a la valeur null.

Remarques

Cette méthode retourne une classe qui encapsule l’objet spécifié Stream et restreint l’accès à celui-ci à partir de plusieurs threads. Tous les accès à l’objet Stream seront thread-safe.

S’applique à