Add threading tests.