func flushChannel(c <-chan struct{}) {
	for {
		select {
		case <-c:
		default:
			return
		}
	}
}
Remove any buffered items from the channel.
package main
import (
	"context"
	"fmt"
	"path/filepath"
	"runtime"
	"runtime/trace"
	"strings"
	"time"
	"github.com/dustin/go-humanize"
	"github.com/martian-lang/martian/martian/core"
	"github.com/martian-lang/martian/martian/util"
)
const WAIT_SECS = 6