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

Refactor main loop in raft node thread for better readability #548

Open
hhwyt opened this issue Sep 4, 2024 · 1 comment
Open

Refactor main loop in raft node thread for better readability #548

hhwyt opened this issue Sep 4, 2024 · 1 comment

Comments

@hhwyt
Copy link

hhwyt commented Sep 4, 2024

The loop symbol for the raft node threads is difficult to notice and can be easily overlooked:

        let handle = thread::spawn(move || loop {
            thread::sleep(Duration::from_millis(10));
            ...

For better readability, we should move the loop to the next line:

        let handle = thread::spawn(move || {
           loop {
                 thread::sleep(Duration::from_millis(10));
                 ...
@hhwyt
Copy link
Author

hhwyt commented Sep 4, 2024

/assign hhwyt

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

1 participant