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
private static RouteManager sInstance;//这种写法静态变量应该用volatile修饰,不然指令重排序可能导致其他线程获取到错误的单例,可以看一下这里说明:https://my.oschina.net/u/2250599/blog/412827 public static RouteManager getInstance(boolean asyncLoadRoute) { if (null == sInstance) { synchronized (RouteManager.class) { if (null == sInstance) { sInstance = new RouteManager(asyncLoadRoute); } } } return sInstance; }
The text was updated successfully, but these errors were encountered:
@aolphn 👍
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: