Implement wait_for_pending_requests