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

Improvement of sleep in loop #365

Open
o0lwj0o opened this issue May 13, 2019 · 1 comment
Open

Improvement of sleep in loop #365

o0lwj0o opened this issue May 13, 2019 · 1 comment

Comments

@o0lwj0o
Copy link

o0lwj0o commented May 13, 2019

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

@VishiNehra
Copy link

Hi, I'm interested in contributing to this issue

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

2 participants