Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Use ConcurrentHashMap instead of ArrayMap to avoid thread safe problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAfc committed Dec 26, 2018
1 parent 2893007 commit fb1c7d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ org.gradle.jvmargs=-Xmx1536M
GROUP=com.alibaba.android
ARTIFACT=tangram
VERSION=1
VERSION_NAME=3.1.9
VERSION_NAME=3.1.9.1
PACKAGING_TYPE=aar
systemProp.compileSdkVersion=26
systemProp.targetSdkVersion=26
Expand Down
2 changes: 1 addition & 1 deletion tangram/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
}
} else {
compile('com.alibaba.android:virtualview:1.3.8@aar') {
compile('com.alibaba.android:virtualview:1.3.8.3@aar') {
transitive true
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'appcompat-v7'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
* {@link O} is the type of data, {@link T} is the array type of data, {@link C} is the class of Group, {@link L} is the class of Component
Expand All @@ -91,7 +92,7 @@
public class BaseTangramEngine<O, T, C, L> implements ServiceManager {


private Map<Class<?>, Object> mServices = new ArrayMap<>();
private ConcurrentHashMap<Class<?>, Object> mServices = new ConcurrentHashMap<>();

@NonNull
private final Context mContext;
Expand Down

0 comments on commit fb1c7d8

Please sign in to comment.