Add different peirods support for more than 2 threads