Udostępnij za pośrednictwem


Klasa AsyncSemaphore

Asynchroniczne klasy jak SemaphoreSlim ze składnią wydania wygodniejsze.

Hierarchia dziedziczenia

Object
  Microsoft.VisualStudio.Threading.AsyncSemaphore

Przestrzeń nazw:  Microsoft.VisualStudio.Threading
Zestaw:  Microsoft.VisualStudio.Threading (w Microsoft.VisualStudio.Threading.dll)

Składnia

'Deklaracja
Public Class AsyncSemaphore
public class AsyncSemaphore
public ref class AsyncSemaphore
type AsyncSemaphore =  class end
public class AsyncSemaphore

Typ AsyncSemaphore uwidacznia następujące elementy członkowskie.

Konstruktorzy

  Nazwa Opis
Metoda publiczna AsyncSemaphore Inicjuje nowe wystąpienie AsyncSemaphore.

Początek

Metody

  Nazwa Opis
Metoda publiczna EnterAsync(CancellationToken) Żądania dostępu do blokady.
Metoda publiczna EnterAsync(Int32, CancellationToken) Żądania dostępu do blokady.
Metoda publiczna EnterAsync(TimeSpan, CancellationToken) Żądania dostępu do blokady.
Metoda publiczna Equals Determines whether the specified object is equal to the current object. (Odziedziczone z Object).
Metoda chroniona Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Odziedziczone z Object).
Metoda publiczna GetHashCode Serves as the default hash function. (Odziedziczone z Object).
Metoda publiczna GetType Gets the Type of the current instance. (Odziedziczone z Object).
Metoda chroniona MemberwiseClone Creates a shallow copy of the current Object. (Odziedziczone z Object).
Metoda publiczna ToString Returns a string that represents the current object. (Odziedziczone z Object).

Początek

Bezpieczeństwo wątku

Wszystkie publiczne static (Shared w języku Visual Basic) elementy członkowskie tego typu są bezpieczne dla wątków. Wystąpienia elementów członkowskich nie dają gwarancji bezpieczeństwa wątków.

Zobacz też

Informacje

Przestrzeń nazw Microsoft.VisualStudio.Threading