init thread sample