Xinyu Tan created RATIS-1785:
--------------------------------

             Summary: Use SingleThreadExecutor to manage the lifetime of single 
thread
                 Key: RATIS-1785
                 URL: https://issues.apache.org/jira/browse/RATIS-1785
             Project: Ratis
          Issue Type: Improvement
            Reporter: Xinyu Tan
            Assignee: Xinyu Tan


While the current SegmentedRaftLogWorker still uses the very primitive Thread 
management approach of `new Thread`, we can use the more mature approach of 
`newSingleThreadExecutor` to manage the lifetime of single thread.

In addition, we also can override all `Executors.newSingleThreadExecutor()`, 
and gives corresponding thread only for them.

This work helps to make the code cleaner



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to