title: FIFO / QUEUE with buffer and thread-safe
body: <p>I'm receiving tons of statistics data that I need to insert into the db.
  I would like to implement some kind of Queue or FIFO class that keeps all the data
  and when it reaches to a specific count (buffer), it will send that data to the SQL through bulk insert. This should be thread-safe.</p>
  
  <p>I know how to make the bulk insert.
  Any advices how to make the queue / list?</p>
  
  <p>Thanks</p>