concourse icon indicating copy to clipboard operation
concourse copied to clipboard

Improvement of sleep in loop

Open o0lwj0o opened this issue 5 years ago • 1 comments

Hi, I found an interesting case in this project. It has “Thread.sleep()” in a “while(true)” loop. I found some discussion in Stackoverflow and other website. It can be refactored by using a executor service. https://ejrh.wordpress.com/2012/07/13/sleeping-in-loops-considered-harmful/ https://stackoverflow.com/questions/3535754/netbeans-java-new-hint-thread-sleep-called-in-loop or Maybe use CountDownLatch.await to automatically awake and shutdown.

Detailed websites and lines: 838 | https://github.com/cinchapi/concourse/blob/develop/concourse-server/src/main/java/com/cinchapi/concourse/server/plugin/PluginManager.java

Best regards

o0lwj0o avatar May 13 '19 18:05 o0lwj0o

Hi, I'm interested in contributing to this issue

VishiNehra avatar Jun 08 '19 12:06 VishiNehra