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 callbackId int
var nextBytes chan int
var exitChan chan bool
var killChan chan bool
func main() {
pipe = make(chan []byte)
nextBytes = make(chan int)
exitChan = make(chan bool)
killChan = make(chan bool)
callbackId = rand.Int()
<-exitChan
<-killChan
}
type reader struct {
@ -89,9 +89,9 @@ func start() int {
return callbackId
}
//export exit
func exit() {
exitChan <- true
//export kill
func kill() {
killChan <- true
}
func createWritePromiseHandler() js.Value {

View File

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