Beispiel #1
0
    /// <summary>
    /// Wait the specified procedureWithCallback.
    /// </summary>
    /// <returns>The wait.</returns>
    /// <param name="procedureWithCallback">Procedure with callback.</param>
    public static IPromise Wait(Action <Action <IPromise> > procedureWithCallback)
    {
        var waiter = new Waiter();

        Debug.LogFormat("new waiter");
        procedureWithCallback(waiter.Wait);
        waiter.Check();
        return(waiter.Ready());
    }