Search Results for

    Show / Hide Table of Contents
    View Source

    Class WaitHandleExtensions

    Provides extension methods for System.Threading.WaitHandle.

    Inheritance
    object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class WaitHandleExtensions

    Methods

    View Source

    WaitOneAsync(WaitHandle, int)

    Asynchronously waits for the wait handle to be signaled.

    Declaration
    public static Task WaitOneAsync(this WaitHandle handle, int millisecondsTimeout = -1)
    Parameters
    Type Name Description
    WaitHandle handle

    The wait handle to wait on.

    int millisecondsTimeout

    The timeout in milliseconds. Defaults to System.Threading.Timeout.Infinite.

    Returns
    Type Description
    Task

    A task that completes when the wait handle is signaled or the timeout elapses.

    Remarks

    Based on http://stackoverflow.com/questions/25382583/waiting-on-a-named-semaphore-with-waitone100-vs-waitone0-task-delay100 and http://blog.nerdbank.net/2011/07/c-await-for-waithandle.html.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX