Extracted code samples from async docs