...
Run Format

Source file src/runtime/testdata/testprogcgo/threadpanic.go

Documentation: runtime/testdata/testprogcgo

     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  }
    25  

View as plain text