Commit 99931c46 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b56b4169
......@@ -715,23 +715,20 @@ func (t *T) deadlock(stream string, eventp interface{}) {
// fatalfInNonMain should be called for fatal cases in non-main goroutines instead of panic.
//
// we don't panic because it will stop the process and prevent the main
// goroutine to print detailed reason for e.g. deadlock or other error.
var fatalLogMu sync.Mutex
func (t *T) fatalfInNonMain(format string, argv ...interface{}) {
t.Helper()
// serialized fatal log+traceback printout, so that such printouts from
// serialize fatal log+traceback printout, so that such printouts from
// multiple goroutines do not get intermixed.
fatalLogMu.Lock()
defer fatalLogMu.Unlock()
t.Logf(format, argv...)
// XXX don't panic - it will stop the process and prevent the
// main goroutine to print detailed reason for e.g. deadlock or
// other error.
// XXX +traceback
t.Logf("%s\n", debug.Stack())
runtime.Goexit()
}
......
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