Eliminate race condition during processDocuments call with multiple URLs