ring-buffer with-thread part of utility
ffmpeg thread locking manager use FIRST CUT