What data structure pipes use?

Circular bounded byte buffer, implicit sync.

Writers wait when buffer is full Readers wait when buffer is empty