refactor threading code
1 file changed