configuring thread timeout and number of threads