TextReader.Synchronized(TextReader) TextReader.Synchronized(TextReader) TextReader.Synchronized(TextReader) TextReader.Synchronized(TextReader) Method

定义

在指定的 TextReader 周围创建线程安全包装。Creates a thread-safe wrapper around the specified TextReader.

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

参数

reader
TextReader TextReader TextReader TextReader

要同步的 TextReaderThe TextReader to synchronize.

返回

一个线程安全的 TextReaderA thread-safe TextReader.

异常

注解

当前方法返回一个类,该类环绕指定TextReader的实例,并通过多个线程限制对该实例的访问。The current method returns a class that wraps around the specified TextReader instance and restricts access to it by multiple threads. 返回的包装中的所有读取都是线程安全的。All reads from the returned wrapper will be thread safe.

适用于

另请参阅