make sure to initialize num_readers before using.