Skip to content
Snippets Groups Projects
Commit 3b788a40 authored by deuce's avatar deuce
Browse files

Loop mutex destruction on EBUSY.

Does Win32 hate this?
parent d274811d
No related branches found
No related tags found
No related merge requests found
......@@ -127,8 +127,9 @@ void RINGBUFCALL RingBufDispose( RingBuf* rb)
CloseEvent(rb->empty_event);
#endif
#ifdef RINGBUF_MUTEX
pthread_mutex_destroy(&rb->mutex);
#endif
while(pthread_mutex_destroy(&rb->mutex)==-1 && errno==EBUSY)
SLEEP(1);
#endi
memset(rb,0,sizeof(RingBuf));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment