v12 / m3u-parser

Simple library for hassle-free M3U playlists parsing
6 stars 2 forks source link

Why return a promise? #30

Closed captbaritone closed 5 years ago

captbaritone commented 5 years ago

None of the work is async, why pull in bluebird at all? Did you anticipate that you might be able to do some work async in the future?

v12 commented 5 years ago

@captbaritone this was done in order not to block event loop when parsing massive playlists.

I had a lot of plans for this library back in the days but never got to it due to other commitments and lack of time to work on the project where this library was used...

captbaritone commented 5 years ago

But there is nothing actually async within the parser, so it's still going to block the event loop, right? I guess it might defer the work until the next event loop, but it would still block.

Not trying to criticize, just trying to make sure I understand. I'm working on my own parser for https://github.com/captbaritone/webamp and was looking at yours for inspiration.