Better thread management for resource retrieval