title: Async logging of a static queue in Objective-C
body: <p>I'd like some advice on how to implement the following in Objective C. The actual application in related to an AB testing framework I'm working on, but that context shouldn't matter too much.</p>
  
  <p>I have an IOS application, and when a certain event happens I'd like to send a log message to a HTTP Service endpoint.</p>
  
  <p>I don't want to send the message every time the event happens. Instead I'd prefer to aggregate them, and when it gets to some (configurable) number, I'd like to send them off async.</p>
  
  <p>I'm thinking to wrap up a static <code>NSMutableArray</code> in a class with an <code>add</code> method. That method can check to see if we have reached the configurable max number, if we have, aggregate and send async.</p>
  
  <p>Does objective-c offer any better constructs to store this data? Perhaps one that helps handle concurrency issues? Maybe some kind of message queue? </p>
  
  <p>I've also seen some solutions with dispatching that I'm still trying to get my head around (I'm new).</p>