fix: rename exit to kill to fix symbol conflict

This commit is contained in:
Derrick Hammer 2023-06-24 04:27:08 -04:00
parent 68283d14e5
commit 50a7c80358
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 7 additions and 7 deletions

View File

@ -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 {

View File

@ -31,7 +31,7 @@ export async function getVerifiableStream(
// @ts-ignore // @ts-ignore
const exit = () => { const exit = () => {
callExports("exit"); callExports("kill");
cleanup(); cleanup();
}; };