-
Notifications
You must be signed in to change notification settings - Fork 296
Make nimbus beacon node accessible for threading and as a module. #7299
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
base: unstable
Are you sure you want to change the base?
Conversation
454ead7 to
413c77e
Compare
| writeFile filename, $os.getCurrentProcessId() | ||
| gPidFile = filename | ||
| addExitProc proc {.noconv.} = discard io2.removeFile(gPidFile) | ||
| if shouldCreatePidFile.load(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this compareandswap(true)? this way, the variable doesn't have to be public and it's guaranteed to run once only
also, this should be moved to nimbus_binary_common if it's going to be shared between binaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be public, otherwise a different thread can not read/write.
The purpose of this change is to avoid the the error triggered by addExitProc on a threaded environment, when it tries to delete something that does not exist anymore.
Agree on moving this to nimbus_binary_common
8949878 to
24ec457
Compare
- Add a public entry point to nimbus beacon. - protect database file lock concurrent creation/deletion
24ec457 to
857a1e4
Compare
a0510ce to
aa88cd4
Compare
6c84d01 to
b118196
Compare
Add a public entry point to nimbus beacon node by changing 'handleStartUpCmd'
scope to public.
protect database file lock concurrent creation/deletion