Reader and writer threads run and wait