developit / workerize

🏗️ Run a module in a Web Worker.
https://github.com/developit/workerize-loader
4.35k stars 91 forks source link

generator and async generator support #39

Open johnsonjo4531 opened 4 years ago

johnsonjo4531 commented 4 years ago

fixes #38 First thing to note about this is that I broke the microbundle build. I'll attempt to fix the generator function to not use things microbundle doesn't expect, but I'm not sure how far I'll get with that. Which that's also something tying up this pull request: https://github.com/developit/greenlet/pull/50

One other thing to note about this is that I decided on returning a promise of the asyncIterator from the generator function. This is due to the fact that the function from the user only ever gets evaluated as an executable function on the worker side.

egriff38 commented 4 years ago

Status?

johnsonjo4531 commented 4 years ago

@xepher0coded The build and tests should be passing I think it is now ready for review.