Add condition variable logic to wait on pending requests