threaded implementation of the cycle test