fix: rename exit to kill to fix symbol conflict
This commit is contained in:
parent
68283d14e5
commit
50a7c80358
|
@ -13,14 +13,14 @@ var activeReader *reader
|
||||||
var pipe chan []byte
|
var pipe chan []byte
|
||||||
var callbackId int
|
var callbackId int
|
||||||
var nextBytes chan int
|
var nextBytes chan int
|
||||||
var exitChan chan bool
|
var killChan chan bool
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
pipe = make(chan []byte)
|
pipe = make(chan []byte)
|
||||||
nextBytes = make(chan int)
|
nextBytes = make(chan int)
|
||||||
exitChan = make(chan bool)
|
killChan = make(chan bool)
|
||||||
callbackId = rand.Int()
|
callbackId = rand.Int()
|
||||||
<-exitChan
|
<-killChan
|
||||||
}
|
}
|
||||||
|
|
||||||
type reader struct {
|
type reader struct {
|
||||||
|
@ -89,9 +89,9 @@ func start() int {
|
||||||
return callbackId
|
return callbackId
|
||||||
}
|
}
|
||||||
|
|
||||||
//export exit
|
//export kill
|
||||||
func exit() {
|
func kill() {
|
||||||
exitChan <- true
|
killChan <- true
|
||||||
}
|
}
|
||||||
|
|
||||||
func createWritePromiseHandler() js.Value {
|
func createWritePromiseHandler() js.Value {
|
||||||
|
|
|
@ -31,7 +31,7 @@ export async function getVerifiableStream(
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const exit = () => {
|
const exit = () => {
|
||||||
callExports("exit");
|
callExports("kill");
|
||||||
cleanup();
|
cleanup();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue