Commit 830a64cb authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e0b002f5
// Copyright (C) 2017-2018 Nexedi SA and Contributors.
// Copyright (C) 2017-2019 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -98,6 +98,8 @@ var chatty = flag.Bool("tracetest.v", false, "verbose: print events as they are
// New channels must be created via NewSyncChan.
//
// It is safe to use SyncChan from multiple goroutines simultaneously.
//
// XXX -> Chan
type SyncChan struct {
msgq chan *SyncMsg
name string
......@@ -129,6 +131,8 @@ func (ch *SyncChan) Recv() *SyncMsg {
// SyncMsg represents message with 1 event sent over SyncChan.
//
// The goroutine which sent the message will wait for Ack before continue.
//
// XXX -> Event?
type SyncMsg struct {
Event interface {}
ack chan<- bool
......
......@@ -158,7 +158,12 @@ func watchMain(argv []string) {
if err != nil {
prog.Fatal(err)
}
// TODO defer stor.Close()
defer func() {
err := stor.Close()
if err != nil {
prog.Fatal(err)
}
}()
err = Watch(ctx, stor, os.Stdout, verbose)
if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment