github.com/likebike/go--@v0.0.0-20190911215757-0bd925d16e96/go/src/runtime/testdata/testprogcgo/threadpanic.go (about) 1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build !plan9 6 7 package main 8 9 // void start(void); 10 import "C" 11 12 func init() { 13 register("CgoExternalThreadPanic", CgoExternalThreadPanic) 14 } 15 16 func CgoExternalThreadPanic() { 17 C.start() 18 select {} 19 } 20 21 //export gopanic 22 func gopanic() { 23 panic("BOOM") 24 }