Pipes are a mechanism for unidirectional interprocess or interthread communication within the scope of a single machine. Logically, a pipe consists of two connected termini, one to which data can be written, and another from which that data can subsequently be read, with a data buffer between such that writes and reads are not required to be synchronous. Pipes should be distinguished from shell pipelines, which are an application of pipes.