private bool AddToDependencyCodeBlockList(async asyncObj) { bool added = false; lock (_dependentCodeBlockList) { if (_executionCompleted == false) { _dependentCodeBlockList.Add(asyncObj); added = true; } } return(added); }
/// <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); }
/// <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); }
/// <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); }
/// <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) { }
/// <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) { }
/// <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) { }