tylinux / BlogComments

Comments of tylinux.com
0 stars 0 forks source link

post/fix-a-react-native-crash-on-mutex/ #2

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

React Native 疑难 Crash 一例 | 不正经的正经程序猿

React Native 疑难 Crash 一例

https://www.tylinux.com/post/fix-a-react-native-crash-on-mutex/

HJWAJ commented 2 years ago

但是这样改的话,锁是不是就失去意义了?按照我的理解: 线程A进入这个函数时,new了个锁a,把a锁上了; 线程B进入这个函数时,new了另一个锁b,把b锁上了,然后接着跑下面的指令,并不会等a解锁?