Last active
February 7, 2017 14:06
-
-
Save kvasdopil/746c15d5c6484ec3b7b0237007e521a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function processStream(stream) | |
| { | |
| while(let data = await stream.read()) | |
| { | |
| // process data | |
| } | |
| } | |
| db.on('end', () => db.close()); | |
| await Promise.all([1, 2, 3].map(i => | |
| processStream(db) | |
| )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment