Stream.Synchronized(Stream) Stream.Synchronized(Stream) Stream.Synchronized(Stream) Method

定義

在指定的 Stream 物件周圍建立安全執行緒 (同步處理) 的包裝函式。Creates a thread-safe (synchronized) wrapper around the specified Stream object.

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

參數

stream
Stream Stream Stream

要同步處理的 Stream 物件。The Stream object to synchronize.

傳回

安全執行緒的 Stream 物件。A thread-safe Stream object.

例外狀況

備註

這個方法會傳回包裝指定的類別Stream物件,並從多個執行緒會限制存取。This method returns a class that wraps the specified Stream object and restricts access to it from multiple threads. 所有存取Stream物件都會是具備執行緒安全。All access to the Stream object will be thread safe.

適用於