コード例 #1
0
ファイル: IOCPTaskScheduler.cs プロジェクト: awb99/AsyncIO
    /// <summary>
    /// Create new IOCP Task Scheduler, the completion port is provided. The user is responsible to dispose the completion port at the end of the use.
    /// </summary>
    /// <param name="completionPort">Completion port the Task Scheduler will use as the blocking method</param>
    /// <param name="numAvailableThreads">Number of threads that will be created by the task scheduler</param>
    public IOCPTaskScheduler(CompletionPort completionPort, int numAvailableThreads)
      : this(numAvailableThreads)
    {
      m_completionPort = completionPort;
      m_ownCompletionPort = false;

      Start();
    }
コード例 #2
0
ファイル: IOCPTaskScheduler.cs プロジェクト: awb99/AsyncIO
    /// <summary>
    /// Create new IOCP TaskScheduler, the completion port will be created and own by the Task Scheduler.
    /// </summary>
    /// <param name="numAvailableThreads">Number of threads that will be created by the task scheduler</param>
    /// <param name="maxConcurrencyLevel">The maximum number of threads that the operation system can allow to curcurrently process I/O completion packets.</param>    
    public IOCPTaskScheduler(int numAvailableThreads, int maxConcurrencyLevel)
      : this(numAvailableThreads)
    {
      m_completionPort = new CompletionPort((uint)maxConcurrencyLevel);
      m_ownCompletionPort = true;

      Start();
    }
コード例 #3
0
        /// <summary>
        /// Create new IOCP Task Scheduler, the completion port is provided. The user is responsible to dispose the completion port at the end of the use.
        /// </summary>
        /// <param name="completionPort">Completion port the Task Scheduler will use as the blocking method</param>
        /// <param name="numAvailableThreads">Number of threads that will be created by the task scheduler</param>
        public IOCPTaskScheduler(CompletionPort completionPort, int numAvailableThreads)
            : this(numAvailableThreads)
        {
            m_completionPort    = completionPort;
            m_ownCompletionPort = false;

            Start();
        }
コード例 #4
0
        /// <summary>
        /// Create new IOCP TaskScheduler, the completion port will be created and own by the Task Scheduler.
        /// </summary>
        /// <param name="numAvailableThreads">Number of threads that will be created by the task scheduler</param>
        /// <param name="maxConcurrencyLevel">The maximum number of threads that the operation system can allow to curcurrently process I/O completion packets.</param>
        public IOCPTaskScheduler(int numAvailableThreads, int maxConcurrencyLevel)
            : this(numAvailableThreads)
        {
            m_completionPort    = new CompletionPort((uint)maxConcurrencyLevel);
            m_ownCompletionPort = true;

            Start();
        }
コード例 #5
0
 public void BindToCompletionPort(CompletionPort completionPort)
 {
     completionPort.AssociateFileHandle(this.Handle);
 }
コード例 #6
0
ファイル: AsyncSocket.cs プロジェクト: awb99/AsyncIO
 public void BindToCompletionPort(CompletionPort completionPort)
 {
   completionPort.AssociateFileHandle(this.Handle);
 }