Pregunta de entrevista de Qumulo

Implement a class that can read values and return them in the order they were written for two threads executing simultaneously, in which one reads and one writes. Required knowledge of locks and synchronization.