Added read/write lock to FIFO and input-thread waiting-count to reporting.