synchronized與Lock的區別
兩者區別:
1.首先synchronized是java內建關鍵字,在jvm層面,Lock是個java類;
2.synchronized無法判斷是否獲取鎖的狀態,Lock可以判斷是否獲取到鎖;
3.synchronized會自動釋放鎖(a 執行緒執行完同步程式碼會釋放鎖 ;b 執行緒執行過程中發生異常會釋放鎖),Lock需在finally中手工釋放鎖(unlock()方法釋放鎖),否則容易造成執行緒死鎖;
4.用synchronized關鍵字的兩個執行緒1和執行緒2,如果當前執行緒1獲得鎖,執行緒2執行緒等待。如果執行緒1阻塞,執行緒2則會一直等待下去,而Lock鎖就不一定會等待下去,如果嘗試獲取不到鎖,執行緒可以不用一直等待就結束了;
5.synchronized的鎖可重入、不可中斷、非公平,而Lock鎖可重入、可判斷、可公平(兩者皆可)
6.Lock鎖適合大量同步的程式碼的同步問題,synchronized鎖適合程式碼少量的同步問題。
小例子:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.cn.test.thread.lock;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class LockTest {
private Lock lock = new ReentrantLock();
/*
* 使用完畢釋放後其他執行緒才能獲取鎖
*/
public void lockTest(Thread thread) {
lock.lock();//獲取鎖
try {
System.out.println(“執行緒”+thread.getName() + “獲取當前鎖”); //列印當前鎖的名稱
Thread.sleep(2000);//為看出執行效果,是執行緒此處休眠2秒
} catch (Exception e) {
System.out.println(“執行緒”+thread.getName() + “發生了異常釋放鎖”);
}finally {
System.out.println(“執行緒”+thread.getName() + “執行完畢釋放鎖”);
lock.unlock(); //釋放鎖
}
}
public static void main(String[] args) {
LockTest lockTest = new LockTest();
//宣告一個執行緒 “執行緒一”
Thread thread1 = new Thread(new Runnable() {
@Override
public void run() {
lockTest.lockTest(Thread.currentThread());
}
}, "thread1");
//宣告一個執行緒 “執行緒二”
Thread thread2 = new Thread(new Runnable() {
@Override
public void run() {
lockTest.lockTest(Thread.currentThread());
}
}, "thread2");
// 啟動2個執行緒
thread2.start();
thread1.start();
}
}
執行結果:
複製程式碼
複製程式碼
package com.cn.test.thread.lock;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class LockTest {
private Lock lock = new ReentrantLock();
/*
* 嘗試獲取鎖 tryLock() 它表示用來嘗試獲取鎖,如果獲取成功,則返回true,如果獲取失敗(即鎖已被其他執行緒獲取),則返回false
*/
public void tryLockTest(Thread thread) {
if(lock.tryLock()) { //嘗試獲取鎖
try {
System.out.println("執行緒"+thread.getName() + "獲取當前鎖"); //列印當前鎖的名稱
Thread.sleep(2000);//為看出執行效果,是執行緒此處休眠2秒
} catch (Exception e) {
System.out.println("執行緒"+thread.getName() + "發生了異常釋放鎖");
}finally {
System.out.println("執行緒"+thread.getName() + "執行完畢釋放鎖");
lock.unlock(); //釋放鎖
}
}else{
System.out.println("我是執行緒"+Thread.currentThread().getName()+"當前鎖被別人佔用,我無法獲取");
}
}
public static void main(String[] args) {
LockTest lockTest = new LockTest();
Thread thread1 = new Thread(new Runnable() {
@Override
public void run() {
lockTest.tryLockTest(Thread.currentThread());
}
}, "thread1");
//宣告一個執行緒 “執行緒二”
Thread thread2 = new Thread(new Runnable() {
@Override
public void run() {
lockTest.tryLockTest(Thread.currentThread());
}
}, "thread2");
// 啟動2個執行緒
thread2.start();
thread1.start();
}
}
複製程式碼
複製程式碼
執行結果:
複製程式碼
複製程式碼
package com.cn.test.thread.lock;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class LockTest {
private Lock lock = new ReentrantLock();
public void tryLockParamTest(Thread thread) throws InterruptedException {
if(lock.tryLock(3000, TimeUnit.MILLISECONDS)) { //嘗試獲取鎖 獲取不到鎖,就等3秒,如果3秒後還是獲取不到就返回false
try {
System.out.println(“執行緒”+thread.getName() + “獲取當前鎖”); //列印當前鎖的名稱
Thread.sleep(4000);//為看出執行效果,是執行緒此處休眠2秒
} catch (Exception e) {
System.out.println(“執行緒”+thread.getName() + “發生了異常釋放鎖”);
}finally {
System.out.println(“執行緒”+thread.getName() + “執行完畢釋放鎖”);
lock.unlock(); //釋放鎖
}
}else{
System.out.println(“我是執行緒”+Thread.currentThread().getName()+“當前鎖被別人佔用,等待3s後仍無法獲取,放棄”);
}
}
public static void main(String[] args) {
LockTest lockTest = new LockTest();
Thread thread1 = new Thread(new Runnable() {
@Override
public void run() {
try {
lockTest.tryLockParamTest(Thread.currentThread());
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}, “thread1”);
//宣告一個執行緒 “執行緒二”
Thread thread2 = new Thread(new Runnable() {
@Override
public void run() {
try {
lockTest.tryLockParamTest(Thread.currentThread());
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}, “thread2”);
// 啟動2個執行緒
thread2.start();
thread1.start();
}
}
複製程式碼
https://github.com/users/dfghfhdfgj7/projects/1047
https://github.com/users/dfghfhdfgj7/projects/1048
https://github.com/users/dfghfhdfgj7/projects/1049
https://github.com/users/dfghfhdfgj7/projects/1050
https://github.com/users/dfghfhdfgj7/projects/1051
https://github.com/users/dfghfhdfgj7/projects/1052
https://github.com/users/dfghfhdfgj7/projects/1053
https://github.com/users/dfghfhdfgj7/projects/1054
https://github.com/users/dfghfhdfgj7/projects/1055
https://github.com/users/dfghfhdfgj7/projects/1056
https://github.com/users/dfghfhdfgj7/projects/1057
https://github.com/users/dfghfhdfgj7/projects/1058
https://github.com/users/dfghfhdfgj7/projects/1059
https://github.com/users/dfghfhdfgj7/projects/1060
https://github.com/users/dfghfhdfgj7/projects/1061
https://github.com/users/dfghfhdfgj7/projects/1062
https://github.com/users/dfghfhdfgj7/projects/1063
https://github.com/users/dfghfhdfgj7/projects/1064
https://github.com/users/dfghfhdfgj7/projects/1065
https://github.com/users/dfghfhdfgj7/projects/1066
https://github.com/users/dfghfhdfgj7/projects/1067
https://github.com/users/dfghfhdfgj7/projects/1068
https://github.com/users/dfghfhdfgj7/projects/1069
https://github.com/users/dfghfhdfgj7/projects/1070
https://github.com/users/dfghfhdfgj7/projects/1071
https://github.com/users/dfghfhdfgj7/projects/1072
https://github.com/users/dfghfhdfgj7/projects/1073
https://github.com/users/dfghfhdfgj7/projects/1074
https://github.com/users/dfghfhdfgj7/projects/1075
https://github.com/users/dfghfhdfgj7/projects/1076
https://github.com/users/dfghfhdfgj7/projects/1077
https://github.com/users/dfghfhdfgj7/projects/1078
https://github.com/users/dfghfhdfgj7/projects/1079
https://github.com/users/dfghfhdfgj7/projects/1080
https://github.com/users/dfghfhdfgj7/projects/1081
https://github.com/users/dfghfhdfgj7/projects/1082
https://github.com/users/dfghfhdfgj7/projects/1083
https://github.com/users/dfghfhdfgj7/projects/1084
https://github.com/users/dfghfhdfgj7/projects/1085
https://github.com/users/dfghfhdfgj7/projects/1086
https://github.com/users/dfghfhdfgj7/projects/1087
https://github.com/users/dfghfhdfgj7/projects/1088
https://github.com/users/dfghfhdfgj7/projects/1089
https://github.com/users/dfghfhdfgj7/projects/1090
https://github.com/users/dfghfhdfgj7/projects/1091
https://github.com/users/dfghfhdfgj7/projects/1092
https://github.com/users/dfghfhdfgj7/projects/1093
https://github.com/users/dfghfhdfgj7/projects/1094
https://github.com/users/dfghfhdfgj7/projects/1095
https://github.com/users/dfghfhdfgj7/projects/1096
https://github.com/users/dfghfhdfgj7/projects/1097
https://github.com/users/dfghfhdfgj7/projects/1098
https://github.com/users/dfghfhdfgj7/projects/1099
https://github.com/users/dfghfhdfgj7/projects/1100
https://github.com/users/dfghfhdfgj7/projects/1101
https://github.com/users/dfghfhdfgj7/projects/1102
https://github.com/users/dfghfhdfgj7/projects/1103
https://github.com/users/dfghfhdfgj7/projects/1104
https://github.com/users/dfghfhdfgj7/projects/1105
https://github.com/users/dfghfhdfgj7/projects/1106
https://github.com/users/dfghfhdfgj7/projects/1107
https://github.com/users/dfghfhdfgj7/projects/1108
https://github.com/users/dfghfhdfgj7/projects/1109
https://github.com/users/dfghfhdfgj7/projects/1110
https://github.com/users/dfghfhdfgj7/projects/1111
https://github.com/users/dfghfhdfgj7/projects/1112
https://github.com/users/dfghfhdfgj7/projects/1113
https://github.com/users/dfghfhdfgj7/projects/1114
https://github.com/users/dfghfhdfgj7/projects/1115
https://github.com/users/dfghfhdfgj7/projects/1116
https://github.com/users/dfghfhdfgj7/projects/1117
https://github.com/users/dfghfhdfgj7/projects/1118
https://github.com/users/dfghfhdfgj7/projects/1119
https://github.com/users/dfghfhdfgj7/projects/1120
https://github.com/users/dfghfhdfgj7/projects/1121
https://github.com/users/dfghfhdfgj7/projects/1122
https://github.com/users/dfghfhdfgj7/projects/1123
https://github.com/users/dfghfhdfgj7/projects/1124
https://github.com/users/dfghfhdfgj7/projects/1125
https://github.com/users/dfghfhdfgj7/projects/1126
https://github.com/users/dfghfhdfgj7/projects/1127
https://github.com/users/dfghfhdfgj7/projects/1128
https://github.com/users/dfghfhdfgj7/projects/1129
https://github.com/users/dfghfhdfgj7/projects/1130
https://github.com/users/dfghfhdfgj7/projects/1131
https://github.com/users/dfghfhdfgj7/projects/1132
https://github.com/users/dfghfhdfgj7/projects/1133
https://github.com/users/dfghfhdfgj7/projects/1134
https://github.com/users/dfghfhdfgj7/projects/1135
https://github.com/users/dfghfhdfgj7/projects/1136
https://github.com/users/dfghfhdfgj7/projects/1137
https://github.com/users/dfghfhdfgj7/projects/1138
https://github.com/users/dfghfhdfgj7/projects/1139
https://github.com/users/dfghfhdfgj7/projects/1140
https://github.com/users/dfghfhdfgj7/projects/1141
https://github.com/users/dfghfhdfgj7/projects/1142
https://github.com/users/dfghfhdfgj7/projects/1143
https://github.com/users/dfghfhdfgj7/projects/1144
https://github.com/users/dfghfhdfgj7/projects/1145
https://github.com/users/dfghfhdfgj7/projects/1146
https://github.com/users/dfghfhdfgj7/projects/1147
https://github.com/users/dfghfhdfgj7/projects/1148
https://github.com/users/dfghfhdfgj7/projects/1149
https://github.com/users/dfghfhdfgj7/projects/1150
https://github.com/users/dfghfhdfgj7/projects/1151
https://github.com/users/dfghfhdfgj7/projects/1152
https://github.com/users/dfghfhdfgj7/projects/1153
https://github.com/users/dfghfhdfgj7/projects/1154
https://github.com/users/dfghfhdfgj7/projects/1155
https://github.com/users/dfghfhdfgj7/projects/1156
https://github.com/users/dfghfhdfgj7/projects/1157
https://github.com/users/dfghfhdfgj7/projects/1158
https://github.com/users/dfghfhdfgj7/projects/1159
https://github.com/users/dfghfhdfgj7/projects/1160
https://github.com/users/dfghfhdfgj7/projects/1161
https://github.com/users/dfghfhdfgj7/projects/1162
https://github.com/users/dfghfhdfgj7/projects/1163
https://github.com/users/dfghfhdfgj7/projects/1164
https://github.com/users/dfghfhdfgj7/projects/1165
https://github.com/users/dfghfhdfgj7/projects/1166
https://github.com/users/dfghfhdfgj7/projects/1167
https://github.com/users/dfghfhdfgj7/projects/1168
https://github.com/users/dfghfhdfgj7/projects/1169
https://github.com/users/dfghfhdfgj7/projects/1170
https://github.com/users/dfghfhdfgj7/projects/1171
https://github.com/users/dfghfhdfgj7/projects/1172
https://github.com/users/dfghfhdfgj7/projects/1173
https://github.com/users/dfghfhdfgj7/projects/1174
https://github.com/users/dfghfhdfgj7/projects/1175
https://github.com/users/dfghfhdfgj7/projects/1176
https://github.com/users/dfghfhdfgj7/projects/1177
https://github.com/users/dfghfhdfgj7/projects/1178
https://github.com/users/fghdfghdfg5/projects/1
https://github.com/users/fghdfghdfg5/projects/2
https://github.com/users/fghdfghdfg5/projects/3
https://github.com/users/fghdfghdfg5/projects/4
https://github.com/users/fghdfghdfg5/projects/5
https://github.com/users/fghdfghdfg5/projects/6
https://github.com/users/fghdfghdfg5/projects/7
https://github.com/users/fghdfghdfg5/projects/8
https://github.com/users/fghdfghdfg5/projects/9
https://github.com/users/fghdfghdfg5/projects/10
https://github.com/users/fghdfghdfg5/projects/11
https://github.com/users/fghdfghdfg5/projects/12
https://github.com/users/fghdfghdfg5/projects/13
https://github.com/users/fghdfghdfg5/projects/14
https://github.com/users/fghdfghdfg5/projects/15
https://github.com/users/fghdfghdfg5/projects/16
https://github.com/users/fghdfghdfg5/projects/17
https://github.com/users/fghdfghdfg5/projects/18
https://github.com/users/fghdfghdfg5/projects/19
https://github.com/users/fghdfghdfg5/projects/20
https://github.com/users/fghdfghdfg5/projects/21
https://github.com/users/fghdfghdfg5/projects/22
https://github.com/users/fghdfghdfg5/projects/23
https://github.com/users/fghdfghdfg5/projects/24
https://github.com/users/fghdfghdfg5/projects/25
https://github.com/users/fghdfghdfg5/projects/26
https://github.com/users/fghdfghdfg5/projects/27
https://github.com/users/fghdfghdfg5/projects/28
https://github.com/users/fghdfghdfg5/projects/29
https://github.com/users/fghdfghdfg5/projects/30
https://github.com/users/fghdfghdfg5/projects/31
https://github.com/users/fghdfghdfg5/projects/32
https://github.com/users/fghdfghdfg5/projects/33
https://github.com/users/fghdfghdfg5/projects/34
https://github.com/users/fghdfghdfg5/projects/35
https://github.com/users/fghdfghdfg5/projects/36
https://github.com/users/fghdfghdfg5/projects/37
https://github.com/users/fghdfghdfg5/projects/38
https://github.com/users/fghdfghdfg5/projects/39
https://github.com/users/fghdfghdfg5/projects/40
https://github.com/users/fghdfghdfg5/projects/41
https://github.com/users/fghdfghdfg5/projects/42
https://github.com/users/fghdfghdfg5/projects/43
https://github.com/users/fghdfghdfg5/projects/44
https://github.com/users/fghdfghdfg5/projects/45
https://github.com/users/fghdfghdfg5/projects/46
https://github.com/users/fghdfghdfg5/projects/47
https://github.com/users/fghdfghdfg5/projects/48
https://github.com/users/fghdfghdfg5/projects/49
https://github.com/users/fghdfghdfg5/projects/50
https://github.com/users/fghdfghdfg5/projects/51
https://github.com/users/fghdfghdfg5/projects/52
https://github.com/users/fghdfghdfg5/projects/53
https://github.com/users/fghdfghdfg5/projects/54
https://github.com/users/fghdfghdfg5/projects/55
https://github.com/users/fghdfghdfg5/projects/56
https://github.com/users/fghdfghdfg5/projects/57
https://github.com/users/fghdfghdfg5/projects/58
https://github.com/users/fghdfghdfg5/projects/59
https://github.com/users/fghdfghdfg5/projects/60
https://github.com/users/fghdfghdfg5/projects/61
https://github.com/users/fghdfghdfg5/projects/62
https://github.com/users/fghdfghdfg5/projects/63
https://github.com/users/fghdfghdfg5/projects/64
https://github.com/users/fghdfghdfg5/projects/65
https://github.com/users/fghdfghdfg5/projects/66
https://github.com/users/fghdfghdfg5/projects/67
https://github.com/users/fghdfghdfg5/projects/68
https://github.com/users/fghdfghdfg5/projects/69
https://github.com/users/fghdfghdfg5/projects/70
https://github.com/users/fghdfghdfg5/projects/71
https://github.com/users/fghdfghdfg5/projects/72
https://github.com/users/fghdfghdfg5/projects/73
https://github.com/users/fghdfghdfg5/projects/74
https://github.com/users/fghdfghdfg5/projects/75
https://github.com/users/fghdfghdfg5/projects/76
https://github.com/users/fghdfghdfg5/projects/77
https://github.com/users/fghdfghdfg5/projects/78
https://github.com/users/fghdfghdfg5/projects/79
https://github.com/users/fghdfghdfg5/projects/80
https://github.com/users/fghdfghdfg5/projects/81
https://github.com/users/fghdfghdfg5/projects/82
https://github.com/users/fghdfghdfg5/projects/83
https://github.com/users/fghdfghdfg5/projects/84
https://github.com/users/fghdfghdfg5/projects/85
https://github.com/users/fghdfghdfg5/projects/86
https://github.com/users/fghdfghdfg5/projects/87
https://github.com/users/fghdfghdfg5/projects/88
https://github.com/users/fghdfghdfg5/projects/89
https://github.com/users/fghdfghdfg5/projects/90
https://github.com/users/fghdfghdfg5/projects/91
https://github.com/users/fghdfghdfg5/projects/92
https://github.com/users/fghdfghdfg5/projects/93
https://github.com/users/fghdfghdfg5/projects/94
https://github.com/users/fghdfghdfg5/projects/95
https://github.com/users/fghdfghdfg5/projects/96
https://github.com/users/fghdfghdfg5/projects/97
https://github.com/users/fghdfghdfg5/projects/98
https://github.com/users/fghdfghdfg5/projects/99
https://github.com/users/fghdfghdfg5/projects/100
https://github.com/users/fghdfghdfg5/projects/101
https://github.com/users/fghdfghdfg5/projects/102
https://github.com/users/fghdfghdfg5/projects/103
https://github.com/users/fghdfghdfg5/projects/104
https://github.com/users/fghdfghdfg5/projects/105
https://github.com/users/fghdfghdfg5/projects/106
https://github.com/users/fghdfghdfg5/projects/107
https://github.com/users/fghdfghdfg5/projects/108
https://github.com/users/fghdfghdfg5/projects/109
https://github.com/users/fghdfghdfg5/projects/110
https://github.com/users/fghdfghdfg5/projects/111
https://github.com/users/fghdfghdfg5/projects/112
https://github.com/users/fghdfghdfg5/projects/113
https://github.com/users/fghdfghdfg5/projects/114
https://github.com/users/fghdfghdfg5/projects/115
https://github.com/users/fghdfghdfg5/projects/116
https://github.com/users/fghdfghdfg5/projects/117
https://github.com/users/fghdfghdfg5/projects/118
https://github.com/users/fghdfghdfg5/projects/119
https://github.com/users/fghdfghdfg5/projects/120
https://github.com/users/fghdfghdfg5/projects/121
https://github.com/users/fghdfghdfg5/projects/122
https://github.com/users/fghdfghdfg5/projects/123
https://github.com/users/fghdfghdfg5/projects/124
https://github.com/users/fghdfghdfg5/projects/125
https://github.com/users/fghdfghdfg5/projects/126
https://github.com/users/fghdfghdfg5/projects/127
https://github.com/users/fghdfghdfg5/projects/128
https://github.com/users/fghdfghdfg5/projects/129
https://github.com/users/fghdfghdfg5/projects/130
https://github.com/users/fghdfghdfg5/projects/131
https://github.com/users/fghdfghdfg5/projects/132
https://github.com/users/fghdfghdfg5/projects/133
https://github.com/users/fghdfghdfg5/projects/134
https://github.com/users/fghdfghdfg5/projects/135
https://github.com/users/fghdfghdfg5/projects/136
https://github.com/users/fghdfghdfg5/projects/137
https://github.com/users/fghdfghdfg5/projects/138
https://github.com/users/fghdfghdfg5/projects/139
https://github.com/users/fghdfghdfg5/projects/140
https://github.com/users/fghdfghdfg5/projects/141
https://github.com/users/fghdfghdfg5/projects/142
https://github.com/users/fghdfghdfg5/projects/143
https://github.com/users/fghdfghdfg5/projects/144
https://github.com/users/fghdfghdfg5/projects/145
https://github.com/users/fghdfghdfg5/projects/146
https://github.com/users/fghdfghdfg5/projects/147
https://github.com/users/fghdfghdfg5/projects/148
https://github.com/users/fghdfghdfg5/projects/149
https://github.com/users/fghdfghdfg5/projects/150
https://github.com/users/fghdfghdfg5/projects/151
https://github.com/users/fghdfghdfg5/projects/152
https://github.com/users/fghdfghdfg5/projects/153
https://github.com/users/fghdfghdfg5/projects/154
https://github.com/users/fghdfghdfg5/projects/155
https://github.com/users/fghdfghdfg5/projects/156
https://github.com/users/fghdfghdfg5/projects/157
https://github.com/users/fghdfghdfg5/projects/158
https://github.com/users/fghdfghdfg5/projects/159
https://github.com/users/fghdfghdfg5/projects/160
https://github.com/users/fghdfghdfg5/projects/161
https://github.com/users/fghdfghdfg5/projects/162
https://github.com/users/fghdfghdfg5/projects/163
https://github.com/users/fghdfghdfg5/projects/164
https://github.com/users/fghdfghdfg5/projects/165
https://github.com/users/fghdfghdfg5/projects/166
https://github.com/users/fghdfghdfg5/projects/167
https://github.com/users/fghdfghdfg5/projects/168
https://github.com/users/fghdfghdfg5/projects/169
https://github.com/users/fghdfghdfg5/projects/170
https://github.com/users/fghdfghdfg5/projects/171
https://github.com/users/fghdfghdfg5/projects/172
https://github.com/users/fghdfghdfg5/projects/173
https://github.com/users/fghdfghdfg5/projects/174
https://github.com/users/fghdfghdfg5/projects/175
https://github.com/users/fghdfghdfg5/projects/176
https://github.com/users/fghdfghdfg5/projects/177
https://github.com/users/fghdfghdfg5/projects/178
https://github.com/users/fghdfghdfg5/projects/179
https://github.com/users/fghdfghdfg5/projects/180
https://github.com/users/fghdfghdfg5/projects/181
https://github.com/users/fghdfghdfg5/projects/182
https://github.com/users/fghdfghdfg5/projects/183
https://github.com/users/fghdfghdfg5/projects/184
https://github.com/users/fghdfghdfg5/projects/185
https://github.com/users/fghdfghdfg5/projects/186
https://github.com/users/fghdfghdfg5/projects/187
https://github.com/users/fghdfghdfg5/projects/188
https://github.com/users/fghdfghdfg5/projects/189
https://github.com/users/fghdfghdfg5/projects/190
https://github.com/users/fghdfghdfg5/projects/191
https://github.com/users/fghdfghdfg5/projects/192
https://github.com/users/fghdfghdfg5/projects/193
https://github.com/users/fghdfghdfg5/projects/194
https://github.com/users/fghdfghdfg5/projects/195
https://github.com/users/fghdfghdfg5/projects/196
https://github.com/users/fghdfghdfg5/projects/197
https://github.com/users/fghdfghdfg5/projects/198
https://github.com/users/fghdfghdfg5/projects/199
https://github.com/users/fghdfghdfg5/projects/200
https://github.com/users/fghdfghdfg5/projects/201
https://github.com/users/fghdfghdfg5/projects/202
https://github.com/users/fghdfghdfg5/projects/203
https://github.com/users/fghdfghdfg5/projects/204
https://github.com/users/fghdfghdfg5/projects/205
https://github.com/users/fghdfghdfg5/projects/206
https://github.com/users/fghdfghdfg5/projects/207
https://github.com/users/fghdfghdfg5/projects/208
https://github.com/users/fghdfghdfg5/projects/209
https://github.com/users/fghdfghdfg5/projects/210
https://github.com/users/fghdfghdfg5/projects/211
https://github.com/users/fghdfghdfg5/projects/212
https://github.com/users/fghdfghdfg5/projects/213
https://github.com/users/fghdfghdfg5/projects/214
https://github.com/users/fghdfghdfg5/projects/215
https://github.com/users/fghdfghdfg5/projects/216
https://github.com/users/fghdfghdfg5/projects/217
https://github.com/users/fghdfghdfg5/projects/218
https://github.com/users/fghdfghdfg5/projects/219
https://github.com/users/fghdfghdfg5/projects/220
https://github.com/users/fghdfghdfg5/projects/221
https://github.com/users/fghdfghdfg5/projects/222
https://github.com/users/fghdfghdfg5/projects/223
https://github.com/users/fghdfghdfg5/projects/224
https://github.com/users/fghdfghdfg5/projects/225
https://github.com/users/fghdfghdfg5/projects/226
https://github.com/users/fghdfghdfg5/projects/227
https://github.com/users/fghdfghdfg5/projects/228
https://github.com/users/fghdfghdfg5/projects/229
https://github.com/users/fghdfghdfg5/projects/230
https://github.com/users/fghdfghdfg5/projects/231
https://github.com/users/fghdfghdfg5/projects/232
https://github.com/users/fghdfghdfg5/projects/233
https://github.com/users/fghdfghdfg5/projects/234
https://github.com/users/fghdfghdfg5/projects/235
https://github.com/users/fghdfghdfg5/projects/236
https://github.com/users/fghdfghdfg5/projects/237
https://github.com/users/fghdfghdfg5/projects/238
https://github.com/users/fghdfghdfg5/projects/239
https://github.com/users/fghdfghdfg5/projects/240
https://github.com/users/fghdfghdfg5/projects/241
https://github.com/users/fghdfghdfg5/projects/242
https://github.com/users/fghdfghdfg5/projects/243
https://github.com/users/fghdfghdfg5/projects/244
https://github.com/users/fghdfghdfg5/projects/245
https://github.com/users/fghdfghdfg5/projects/246
https://github.com/users/fghdfghdfg5/projects/247
https://github.com/users/fghdfghdfg5/projects/248
https://github.com/users/fghdfghdfg5/projects/249
https://github.com/users/fghdfghdfg5/projects/250
https://github.com/users/fghdfghdfg5/projects/251
https://github.com/users/fghdfghdfg5/projects/252
https://github.com/users/fghdfghdfg5/projects/253
https://github.com/users/fghdfghdfg5/projects/254
https://github.com/users/fghdfghdfg5/projects/255
https://github.com/users/fghdfghdfg5/projects/256
https://github.com/users/fghdfghdfg5/projects/257
https://github.com/users/fghdfghdfg5/projects/258
https://github.com/users/fghdfghdfg5/projects/259
https://github.com/users/fghdfghdfg5/projects/260
https://github.com/users/fghdfghdfg5/projects/261
https://github.com/users/fghdfghdfg5/projects/262
https://github.com/users/fghdfghdfg5/projects/263
https://github.com/users/fghdfghdfg5/projects/264
https://github.com/users/fghdfghdfg5/projects/265
https://github.com/users/fghdfghdfg5/projects/266
https://github.com/users/fghdfghdfg5/projects/267
https://github.com/users/fghdfghdfg5/projects/268
https://github.com/users/fghdfghdfg5/projects/269
https://github.com/users/fghdfghdfg5/projects/270
https://github.com/users/fghdfghdfg5/projects/271
https://github.com/users/fghdfghdfg5/projects/272
https://github.com/users/fghdfghdfg5/projects/273
https://github.com/users/fghdfghdfg5/projects/274
相關文章
- synchronized與Lock的區別與使用詳解synchronized
- Lock 和 synchronized的區別synchronized
- Lock、Synchronized鎖區別解析synchronized
- volatile與synchronized的區別synchronized
- Synchronized 與 ReentrantLock 的區別synchronizedReentrantLock
- synchronized與ReentrantLock的區別synchronizedReentrantLock
- synchronized 與 Lock 的對比synchronized
- 四、Synchronized與Lock原理synchronized
- Java synchronized與ReentrantLock的區別JavasynchronizedReentrantLock
- 【面試普通人VS高手系列】lock和synchronized區別面試synchronized
- synchronized和volatile的區別synchronized
- 淺談synchronized、Lock、ThreadLocal和semaphoresynchronizedthread
- 基礎才是重中之重~lock和monitor的區別
- synchronized Lock(本地同步)鎖的8種情況synchronized
- 【ASK_ORACLE】Library cache pin 與 library load lock的關係和區別Oracle
- JUC之Lock介面以及Synchronized回顧synchronized
- Java synchronized物件級別與類級別的同步鎖Javasynchronized物件
- 用阻塞佇列實現一個生產者消費者模型?synchronized和lock有什麼區別?佇列模型synchronized
- 【JavaSE】Lock鎖和synchronized鎖的比較,lock鎖的特性,讀寫鎖的實現。Javasynchronized
- Java培訓教程之使用Lock取代synchronizedJavasynchronized
- mongod命令的一些引數以及引數--pidfilepath與mongod.lock區別Go
- Java併發指南4:Java中的鎖 Lock和synchronizedJavasynchronized
- Synchronized ,Volatile,Lock 三者不可告人的祕密synchronized
- ??與?:的區別
- Volatile關鍵字&&DCL單例模式,volatile 和 synchronized 的區別單例模式synchronized
- Java中的執行緒安全:從synchronized到Lock的深入理解Java執行緒synchronized
- const與static的區別
- HTTP 與 HTTPS 的區別HTTP
- getAttribute() 與 attr() 的區別
- @import與<link> 的區別Import
- Postgresql與MySQL的區別MySql
- HashSet與HashMap的區別HashMap
- HashTable與ConcurrentHashMap的區別HashMap
- maven與ant的區別Maven
- __new()__ 與 __init()__的區別
- @Autowired 與@Resource的區別
- gulp與webpack的區別Web
- free 與 CFRelease 的區別