Truncate() public method

public Truncate ( Loop loop, int offset ) : void
loop Loop
offset int
return void
Beispiel #1
0
        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);
        }
Beispiel #2
0
 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);
     }
 }