Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: don't abort() when trylock functions return EBUSY
Browse files Browse the repository at this point in the history
Fixes #500.
  • Loading branch information
chobie authored and bnoordhuis committed Jul 25, 2012
1 parent 94355e4 commit 22f004d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/unix/thread.c
Expand Up @@ -78,7 +78,7 @@ int uv_mutex_trylock(uv_mutex_t* mutex) {

r = pthread_mutex_trylock(mutex);

if (r && r != EAGAIN)
if (r && r != EBUSY && r != EAGAIN)
abort();

if (r)
Expand Down Expand Up @@ -119,7 +119,7 @@ int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) {

r = pthread_rwlock_tryrdlock(rwlock);

if (r && r != EAGAIN)
if (r && r != EBUSY && r != EAGAIN)
abort();

if (r)
Expand All @@ -146,7 +146,7 @@ int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) {

r = pthread_rwlock_trywrlock(rwlock);

if (r && r != EAGAIN)
if (r && r != EBUSY && r != EAGAIN)
abort();

if (r)
Expand Down

0 comments on commit 22f004d

Please sign in to comment.