robbiehanson/CocoaAsyncSocket — pull request #49 by gghose (2012-04-28 01:02:57+00:00)
Title: Update RunLoop/AsyncUdpSocket.m

Found a pretty bad bug. The queues aren't safe because you can potentially remove objects at position 0 (dequeuing) at the same time you're adding objects. The solution is to put in a lock whenever you manipulate the queue. This got rid of consistent crashes for me.

So I've added NSLock objects theSendQueueLock and theReceiveQueueLock. (Note you'll need to declare them in the corresponding AsyncUdpSocket.h).

This is the only part of the library I'm actually using, so I don't know how pervasive this queuing problem is.