Added ringbuffer sample (pthreads version)