ReaderWriterLock Construtor
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Inicializa uma nova instância da ReaderWriterLock classe.
public:
ReaderWriterLock();
public ReaderWriterLock();
Public Sub New ()
Exemplos
O exemplo de código seguinte demonstra como criar uma nova instância da ReaderWriterLock classe.
Este código faz parte de um exemplo mais amplo fornecido para a ReaderWriterLock turma.
// The complete code is located in the ReaderWriterLock class topic.
using System;
using System.Threading;
public class Example
{
static ReaderWriterLock rwl = new ReaderWriterLock();
// Define the shared resource protected by the ReaderWriterLock.
static int resource = 0;
' The complete code is located in the ReaderWriterLock class topic.
Imports System.Threading
Public Module Example
Private rwl As New ReaderWriterLock()
' Define the shared resource protected by the ReaderWriterLock.
Private resource As Integer = 0
}
End Module
Aplica-se a
Ver também
- de threading gerenciado
- ReaderWriterLock