/// <summary>
        /// Gets the requested execution report off of the queue.
        /// </summary>
        /// <param name="reportIdentifier">Report to retrieve.</param>
        /// <param name="numberOfOtherWaiters">Count of remaining waiters after our report arrives.</param>
        /// <returns>The execution report in question.</returns>
        public CloudExecutionReport GetReport(string reportIdentifier, out int numberOfOtherWaiters)
        {
            CloudExecutionWaiter waiter = new CloudExecutionWaiter();

            // Add the desired report to the dictionary under lock.
            this.reportWaitersLock.WaitOne();
            this.reportWaiters.Add(reportIdentifier, waiter);
            this.haveReportWaiters.Set();
            this.reportWaitersLock.ReleaseMutex();

            // Wait for report to arrive, and then return it.
            return(waiter.WaitForReport(out numberOfOtherWaiters));
        }
示例#2
0
        /// <summary>
        /// Gets the requested execution report off of the queue.
        /// </summary>
        /// <param name="reportIdentifier">Report to retrieve.</param>
        /// <param name="numberOfOtherWaiters">Count of remaining waiters after our report arrives.</param>
        /// <returns>The execution report in question.</returns>
        public CloudExecutionReport GetReport(string reportIdentifier, out int numberOfOtherWaiters)
        {
            CloudExecutionWaiter waiter = new CloudExecutionWaiter();

            // Add the desired report to the dictionary under lock.
            this.reportWaitersLock.WaitOne();
            this.reportWaiters.Add(reportIdentifier, waiter);
            this.haveReportWaiters.Set();
            this.reportWaitersLock.ReleaseMutex();

            // Wait for report to arrive, and then return it.
            return waiter.WaitForReport(out numberOfOtherWaiters);
        }