AsyncSemaphore::EnterAsync Method (TimeSpan, CancellationToken)
Visual Studio 2015
Requests access to the lock.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
public:
Task<AsyncSemaphore::Releaser>^ EnterAsync(
TimeSpan timeout,
CancellationToken cancellationToken = null
)
Parameters
- timeout
-
Type:
System::TimeSpan
A TimeSpan that represents the timeout value.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A token whose cancellation signals lost interest in the lock.
Return Value
Type: System.Threading.Tasks::Task<AsyncSemaphore::Releaser>^A Task<TResult> whose result is a releaser that should be disposed to release the lock.
Show: