Skip to content
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

Race condition with read/write to 'corrupt' field #3

Open
l0k18 opened this issue May 8, 2019 · 1 comment
Open

Race condition with read/write to 'corrupt' field #3

l0k18 opened this issue May 8, 2019 · 1 comment

Comments

@l0k18
Copy link

l0k18 commented May 8, 2019

I have forked this repository, as I can see the original author has not made any commits for a year to here: https://git.parallelcoin.io/dev/rudp - just want to remark firstly that it is mostly very nice readable code.

The corrupt field is written to in multiple goroutines so in my fork I have changed the value to use go.uber.org/atomic int32 to store the error value and now the tests run without flagging a race condition. I have also taken the liberty of correcting the naming of method receivers to Go idiom.

This commit: https://git.parallelcoin.io/dev/rudp/commit/efb6fb9d1faeedab0dd550ba9f977100b1b8222d has all of these changes directly from your code and will only differ in the changes I made to redirect the imports of the example code.

Thank you for writing this, I was searching for a Go implementation of RUDP and this saves me writing a simpler, less powerful but (maybe) faster version, and because it can drop in where TCP connections are used, it can be used with HTTP for RPC (or any web service), while allowing potentially easy connectivity to any other language via its RUDP implementation. This is a more mature, simpler protocol than QUIC, with a lot of code existing already that knows how to use it.

@u35s
Copy link
Owner

u35s commented May 24, 2019

你发现的问题已修复,非常感谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants