We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pop
push
ConcurrentHashMap
//以前是TimerTask处理方式 private void startTimer() { if(!stopFlag && hasTask == false) { hasTask = true; timerHandler.postDelayed(new Runnable() { @Override public void run() { timerImpl(); hasTask = false; startTimer(); } }, 5 * 1000); } }
延时5秒的定时任务会导致极端情况下,超时时间会延长5秒
The text was updated successfully, but these errors were encountered:
No branches or pull requests
pop
,push
方法 pop用了synchronized锁,push没有,实际上callBackQueue使用的ConcurrentHashMap
是线程安全的延时5秒的定时任务会导致极端情况下,超时时间会延长5秒
The text was updated successfully, but these errors were encountered: