Exemplo n.º 1
0
        public FileQueue(int concurrentWrites, FileCommitCallback callback)
        {
            if (concurrentWrites < 1)
            {
                throw new ArgumentOutOfRangeException("concurrent" + "Writes");
            }

            if (bufferSize < 1)
            {
                throw new ArgumentOutOfRangeException("buffer" + "Size");
            }

            if (callback == null)
            {
                throw new ArgumentNullException("callback");
            }

            syncRoot = new object();

            active  = new Chunk[concurrentWrites];
            pending = new Queue <Page>();

            this.callback = callback;

            idle = new ManualResetEvent(true);
        }
Exemplo n.º 2
0
		public FileQueue(int concurrentWrites, FileCommitCallback callback)
		{
			if (concurrentWrites < 1)
			{
				throw new ArgumentOutOfRangeException("concurrent" + "Writes");
			}

			if (bufferSize < 1)
			{
				throw new ArgumentOutOfRangeException("buffer" + "Size");
			}

			if (callback == null)
			{
				throw new ArgumentNullException("callback");
			}

			syncRoot = new object();

			active = new Chunk[concurrentWrites];
			pending = new Queue<Page>();

			this.callback = callback;

			idle = new ManualResetEvent(true);
		}