jakemarsh/JMImageCache — pull request #18 by jlnr (2013-01-07 07:18:13+00:00)
Title: Initialize static variables atomically

Hello Jake,

Thanks for the useful library. I've noticed that some global variables are not initialized atomically. I haven't run into any problems but I think it would be safer to initialize them using `dispatch_once`, to prevent potential race conditions between the very first two calls to `setImageURL...`. If you place breakpoints in both places and remove the call to `removeAllImages` from the demo program, you can see that they are indeed being called from different threads.