added non safe ring buffer
buffered channel refactor using ring buffer
blocking ring buffer now uses a ring buffer