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