Improved handling of the threads for downloading and processing new messages