-
Notifications
You must be signed in to change notification settings - Fork 570
calling os.Exit(0) from a gopherjs run
invocation fails with "fatal error: all goroutines are asleep - deadlock!"
#531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just checking, are you familiar with https://github.com/gopherjs/gopherjs#application-lifecycle? |
My understanding was that only applies to the browser... |
You can see the workaround I'm using presently at nullstyle@8d4d6d0 |
I cannot reproduce with latest version of GopherJS. I have Node version v6.7.0 with both node-syscall and source-map-support modules installed. Running the program above gives me: $ node --version
v6.7.0
$ go run main.go
hello world
$ gopherjs run main.go
hello world
$ Can you try again with both node-syscall and source-map-support modules installed? I suspect that they might make a difference. If so, this is definitely related to #449 (see discussion about source-map-support there). |
after installing node-syscall, the issue no longer occurs. I didn't even know node-syscall was a thing, seems like it should be in the README. Are you open to me making a PR to add that? Is there anyway to get node-syscall into npm? |
Okay, thanks for confirming.
It is in the README, in the Installation and Usage section. https://github.com/gopherjs/gopherjs#installation-and-usage
I do not know much about npm. |
IMO It's not clear that it's required to get basic behavior like |
I'm not familiar with node, and I don't know how to install node-syscall... |
As far as I can tell, the only remaining actionable issue here was this:
I believe that has been fixed in 33af5e0. Closing. |
Here's the repro script:
sample results:
This appears to be the root cause of #395 as well.
The text was updated successfully, but these errors were encountered: