All threads written, trying to solve deadlock