Skip to content

Commit

Permalink
Prevent csv-to-json with async iterators from blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
Qard committed Nov 7, 2019
1 parent 3728e8f commit ee17952
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions performance/csv-to-json/async-iterator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ async function* csv (iterator) {
keys = values
} else {
yield zipKeyValueLists(keys, values)
await new Promise(setImmediate)
}

buffer = buffer.slice(position + 1)
Expand Down

1 comment on commit ee17952

@vercel
Copy link

@vercel vercel bot commented on ee17952 Nov 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.