Quantcast
Channel: User Ben Aston - Stack Overflow
Viewing all articles
Browse latest Browse all 56

Why does this async generator cause the JavaScript runtime to hang?

$
0
0

The following JavaScript causes the runtime to hang on Chrome (v80.0.3987.116) and Firefox (v72.0.2) on OSX 10.15.2.

Why?

Note that I am marking the iterator function as async.

const iterable = {    async *[Symbol.iterator]() {        yield 'one'    }}console.log([...iterable])

Viewing all articles
Browse latest Browse all 56

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>