Gross multithread implementation.