-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Locking... #8
Comments
Hi, sorry for delay with answer. I'm happy to hear that this project is useful and can be a painkiller for you :). I will try to look it deeper a bit later, but you are welcome to make PR |
Hi, no problem! I will look into it and see if I can put together a pull request! So far it's working really great. Probably the best way to integrate golang libraries with erlang. Maybe now with the introduction of go modules it can also be built as part of a rebar3 application. |
Hi a small question. how to convert the int parameters in gen server call i can get getZrange and num_list_11111111 but {2...) gives error if i change 2 in to a string then its working Call recovered: &runtime.TypeAssertionError{_interface:(*runtime._type)(0x8be3a0), concrete:(*runtime._type)(0x88f380), asserted:(*runtime._type)(0x88e880), missingMethod:""} please help me on this |
@ciyrus could you please show me your implementation of genserver |
Thank You for the reply just executing below in Erlang shell in go implementation i'm getting the parameters like below input 1 output 1 in go getZrange input 2 (changed getZrange to an integer) output 2 in go |
The reason of this behavior due to this line
It's expected an atom, not an integer. |
Can u please guide how to convert it to integer. |
Please, have a look this example https://github.com/halturin/ergonode/blob/master/examples/gonode.go Especially line 48. |
Thanks a lot. found it. need to check the type first... that's what i missed Once again Thanks a lot |
i've just merged a bunch of updates, so its not valid anymore |
# This is the 1st commit message: osdep # This is the commit message #2: Fix Windows support (#30) * Fix Windows support * Updates for the tests related to the timing conditions due to specifics of the testing environment # This is the commit message #3: Update README.md # This is the commit message #4: sync # This is the commit message #5: sync # This is the commit message #6: fix TermIntoStruct. new TermMapIntoStruct # This is the commit message #7: sync # This is the commit message #8: sync # This is the commit message #9: sync # This is the commit message #10: sync # This is the commit message #11: sync # This is the commit message #12: sync # This is the commit message #13: sync # This is the commit message #14: sync # This is the commit message #15: sync # This is the commit message #16: sync # This is the commit message #17: sync # This is the commit message #18: sync # This is the commit message #19: sync # This is the commit message #20: sync # This is the commit message #21: sync # This is the commit message #22: sync # This is the commit message #23: sync # This is the commit message #24: sync # This is the commit message #25: sync # This is the commit message #26: sync # This is the commit message #27: sync # This is the commit message #28: sync # This is the commit message #29: sync # This is the commit message #30: sync # This is the commit message #31: sync # This is the commit message #32: sync # This is the commit message #33: sync # This is the commit message #34: sync # This is the commit message #35: sync # This is the commit message #36: sync # This is the commit message #37: sync # This is the commit message #38: sync # This is the commit message #39: sync # This is the commit message #40: sync # This is the commit message #41: sync # This is the commit message #42: sync # This is the commit message #43: sync # This is the commit message #44: sync # This is the commit message #45: sync # This is the commit message #46: sync # This is the commit message #47: sync # This is the commit message #48: sync # This is the commit message #49: sync # This is the commit message #50: sync # This is the commit message #51: sync # This is the commit message #52: sync # This is the commit message #53: sync # This is the commit message #54: sync # This is the commit message #55: sync # This is the commit message #56: sync # This is the commit message #57: sync # This is the commit message #58: sync # This is the commit message #59: sync # This is the commit message #60: sync # This is the commit message #61: sync # This is the commit message #62: sync # This is the commit message #63: sync # This is the commit message #64: sync # This is the commit message #65: sync # This is the commit message #66: sync
I was wondering if
node.Send()
was safe to call from a worker go routine, so I was digging around in the code and noticed that some structuresnode.connections
, for example, was protected by a mutex for writing, but not for reading. This is not sufficient (unless I'm missing something?)node.connections
could ideally be protected by a RWMutex (https://golang.org/pkg/sync/#RWMutex) that can be held by many readers but only one writer...Let me know if you are interested in a pull request, or am I missing something clever?
Fantastic project!! After struggling with writing a stdin/stdout port with a lot of buffering issues I'm so happy I found this!
Not protected:
https://github.com/halturin/ergonode/blob/d13e6eebb13d3f1589a62e789ce4a947fc24ed34/ergonode.go#L442
Protected:
https://github.com/halturin/ergonode/blob/c08e4a55356eb58cbe82a07a1d020153c550b003/ergonode.go#L373
The text was updated successfully, but these errors were encountered: