示例#1
0
        internal void Enqueue(CachedEntry entry)
        {
            syncQueue.Enqueue(entry);

            if (!running)
            {
                lock (this)
                {
                    running = true;
                    Thread th = new Thread(new ThreadStart(this.Dequeue));
                    th.Start();
                }
            }
        }
示例#2
0
 private void Write(CachedEntry entry, FileStream fs)
 {
     fs.Write(entry.Buffer, entry.Offset, entry.Count);
     fs.Flush();
 }
示例#3
0
 public override void Write(byte[] buffer, int offset, int count)
 {
     var entry = new CachedEntry(buffer, offset, count);
     _queueManager.Enqueue(entry);
 }