Extracted relax2thread method to relax.c