Esempio n. 1
0
        /// <summary>
        /// Poll writers.
        /// </summary>
        /// <param name="index">The current write queue index.</param>
        /// <param name="threadIndex">The current thread index.</param>
        private void PollWriteEx(int index, int threadIndex)
        {
            // Get the current write operation.
            IMultiplexed mux = _writeQueues[threadIndex][index];;

            // If not listener.
            if (!mux.IsListener)
            {
                // Write operation.
                bool allSent = mux.ReadyWrite();
                if (!allSent)
                {
                    // Remove the mux from the queue
                    // If all data has been writen.
                    _writeQueueToRemoves[threadIndex].Add(mux);
                }
            }
        }