RAII for FIFOS