pull/314/head
Darien Raymond 2016-11-22 00:42:31 +01:00
parent de414de7a2
commit 13b1bf09cf
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 2 additions and 0 deletions

View File

@ -78,9 +78,11 @@ func (this *BufferedWriter) Flush() error {
}
func (this *BufferedWriter) FlushWithoutLock() error {
fmt.Println("BufferedWriter flushing")
defer this.buffer.Clear()
for !this.buffer.IsEmpty() {
nBytes, err := this.writer.Write(this.buffer.Value)
fmt.Printf("BufferedWriting flushed %d bytes.\n", nBytes)
if err != nil {
return err
}