AsyncSemaphore::EnterAsync Method (Int32, CancellationToken)
Visual Studio 2015
Requests access to the lock.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
public: Task<AsyncSemaphore::Releaser>^ EnterAsync( int timeout, CancellationToken cancellationToken = null )
Parameters
- timeout
-
Type:
System::Int32
The timeout for waiting for the lock.
- 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: