moved thread data initialization forward, removed unnecessary thread creation lock