File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -155,13 +155,7 @@ internal class Lock {
155155 attr. deallocate ( )
156156 }
157157
158- // Darwin pthread for 32-bit ARM somehow returns `EAGAIN` when
159- // using `trylock` on a `PTHREAD_MUTEX_ERRORCHECK` mutex.
160- #if DEBUG && !arch(arm)
161158 pthread_mutexattr_settype ( attr, Int32 ( recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_ERRORCHECK) )
162- #else
163- pthread_mutexattr_settype ( attr, Int32 ( recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL) )
164- #endif
165159
166160 let status = pthread_mutex_init ( _lock, attr)
167161 assert ( status == 0 , " Unexpected pthread mutex error code: \( status) " )
@@ -184,7 +178,7 @@ internal class Lock {
184178 switch status {
185179 case 0 :
186180 return true
187- case EBUSY:
181+ case EBUSY, EAGAIN :
188182 return false
189183 default :
190184 assertionFailure ( " Unexpected pthread mutex error code: \( status) " )
You can’t perform that action at this time.
0 commit comments