Learning process and thread, add some codes