Quick hack to account for async evens getting coalesced #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While playing with node9 on both Mac OS X and Linux over the holidays, I kept running into a weird issue where if I cut-n-paste any text string into the console -- the console driver would get behind a random number of characters and not deliver strings back to the shell when I pressed enter. After some investigation it turns out that
libav
doesn't have a guarantee that Xuv_async_send
events would trigger exactly X wakeups of a handler. In fact, the handler may actually get woken up anywhere between 1 and X times (but at least one is guaranteed). This, of course, explains why I would see this 'console driver getting behind issue' and suggests a very simply fix along the lines of this PR.We should probably turn it into a proper while loop if this gets to be the way we fix this issue, but I wanted to show the idea in the smallest diff possible first.
@jvburnes please let me know WDYT