示例#1
0
        private bool AddToDependencyCodeBlockList(async asyncObj)
        {
            bool added = false;

            lock (_dependentCodeBlockList)
            {
                if (_executionCompleted == false)
                {
                    _dependentCodeBlockList.Add(asyncObj);
                    added = true;
                }
            }
            return(added);
        }
示例#2
0
 /// <summary>
 /// Creates an instance of async class, that executes
 /// the wrapped code block on the developer supplied
 /// Managed IOCP based ThreadPool
 /// </summary>
 /// <param name="ad">
 /// Anonymous delegate wrapping the code block to execute
 /// </param>
 /// <param name="tp">Managed IOCP based ThreadPool object</param>
 /// <param name="dependentOnAsync">
 /// async object on which the current instance of async
 /// depends on. The code wrapped by the current instance
 /// of async object will be executed after the code wrapped
 /// by dependentOnAsync object has completed execution
 /// </param>
 /// <param name="executionCompleteCallback">
 /// Delegate handler that will be called when the execution of the
 /// code block wrapped by this instance is completed. Dependent
 /// async objects will be scheduled for execution after the
 /// completion callback has executed
 /// </param>
 public async(AsyncDelegate ad, ThreadPool tp, async dependentOnAsync,
              AsyncCodeBlockExecutionCompleteCallback executionCompleteCallback)
 {
     Initialize(ad, tp, new[] { dependentOnAsync }, executionCompleteCallback);
 }
示例#3
0
 /// <summary>
 /// Creates an instance of async class, that executes
 /// the wrapped code block on the developer supplied
 /// Managed IOCP based ThreadPool
 /// </summary>
 /// <param name="ad">
 /// Anonymous delegate wrapping the code block to execute
 /// </param>
 /// <param name="tp">Managed IOCP based ThreadPool object</param>
 /// <param name="dependentOnAsync">
 /// async object on which the current instance of async
 /// depends on. The code wrapped by the current instance
 /// of async object will be executed after the code wrapped
 /// by dependentOnAsync object has completed execution
 /// </param>
 public async(AsyncDelegate ad, ThreadPool tp, async dependentOnAsync)
 {
     Initialize(ad, tp, new[] { dependentOnAsync }, null);
 }
示例#4
0
 /// <summary>
 /// Creates an instance of async class, that executes
 /// the wrapped code block on the default AppDomain wide
 /// Managed IOCP based ThreadPool
 /// </summary>
 /// <param name="ad">
 /// Anonymous delegate wrapping the code block to execute
 /// </param>
 /// <param name="dependentOnAsync">
 /// async object on which the current instance of async
 /// depends on. The code wrapped by the current instance
 /// of async object will be executed after the code wrapped
 /// by dependentOnAsync object has completed execution
 /// </param>
 public async(AsyncDelegate ad, async dependentOnAsync)
 {
     Initialize(ad, null, new[] { dependentOnAsync }, null);
 }
示例#5
0
 /// <summary>
 /// Creates an instance of waitableasync class, that executes
 /// the wrapped code block on the default AppDomain wide
 /// Managed IOCP based ThreadPool
 /// </summary>
 /// </summary>
 /// <param name="ad">
 /// Anonymous delegate wrapping the code block to execute
 /// </param>
 /// <param name="dependentOnAsync">
 /// async object on which the current instance of waitableasync
 /// depends on. The code wrapped by the current instance
 /// of async object will be executed after the code wrapped
 /// by dependentOnAsync object has completed execution
 /// </param>
 public waitableasync(AsyncDelegate ad, async dependentOnAsync)
     : base(ad, dependentOnAsync)
 {
 }
示例#6
0
 /// <summary>
 /// Creates an instance of waitableasync class, that executes
 /// the wrapped code block on the default AppDomain wide or
 /// developer supplied Managed IOCP based ThreadPool
 /// </summary>
 /// <param name="ad">
 /// Anonymous delegate wrapping the code block to execute
 /// </param>
 /// <param name="tp">Managed IOCP based ThreadPool object</param>
 /// <param name="dependentOnAsync">
 /// async object on which the current instance of waitableasync
 /// depends on. The code wrapped by the current instance
 /// of async object will be executed after the code wrapped
 /// by dependentOnAsync object has completed execution
 /// </param>
 /// <param name="executionCompleteCallback">
 /// Delegate handler that will be called when the execution of the
 /// code block wrapped by this instance is completed. Dependent
 /// async objects will be scheduled for execution after the
 /// completion callback has executed
 /// </param>
 public waitableasync(AsyncDelegate ad, ThreadPool tp, async dependentOnAsync,
                      AsyncCodeBlockExecutionCompleteCallback executionCompleteCallback)
     : base(ad, tp, dependentOnAsync, executionCompleteCallback)
 {
 }
示例#7
0
 /// <summary>
 /// Creates an instance of waitableasync class, that executes
 /// the wrapped code block on the default AppDomain wide or
 /// developer supplied Managed IOCP based ThreadPool
 /// </summary>
 /// <param name="ad">
 /// Anonymous delegate wrapping the code block to execute
 /// </param>
 /// <param name="tp">Managed IOCP based ThreadPool object</param>
 /// <param name="dependentOnAsync">
 /// async object on which the current instance of waitableasync
 /// depends on. The code wrapped by the current instance
 /// of async object will be executed after the code wrapped
 /// by dependentOnAsync object has completed execution
 /// </param>
 public waitableasync(AsyncDelegate ad, ThreadPool tp, async dependentOnAsync)
     : base(ad, tp, dependentOnAsync)
 {
 }