Skip to content

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

@hhwyt

Description

@hhwyt

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));
                 ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions