Generate ids asynchronously