Last active
August 29, 2015 14:04
-
-
Save moltak/510c6ee75f9d097e312d to your computer and use it in GitHub Desktop.
polling code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Thread(new Runnable() { | |
@Override | |
public void run() { | |
while(true) { | |
if(toShow != null && toShow.size() > 0) { | |
// 잠옹코드 | |
break; | |
} | |
// toShow사이즈가 0보다 크지 않으면 0.5초간 슬립 | |
try { | |
Thread.sleep(500); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
} | |
} | |
}).start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment