void WorkWrite() { if (queue.Count == 0) { OnDrain(); if (shutdown) { uvfile.Truncate(writeoffset, Finish); } return; } var item = queue.Peek(); uvfile.Write(item.data, item.index, item.count, HandleWrite, writeoffset); }
void WorkWrite() { if (queue.Count == 0) { if (shutdown) { uvfile.Truncate(writeoffset, Finish); //uvfile.Close(shutdownCallback); } OnDrain(); } else { // handle next write var item = queue.Peek(); uvfile.Write(Loop, writeoffset, item.Item1, HandleWrite); } }