Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major refactoring: Callback & iterable support #273

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

andywer
Copy link
Owner

@andywer andywer commented Jun 29, 2020

Allows you to expose callbacks function. Works main-to-worker as well as worker-to-main.

It's a major refactoring, using the callbacks to implement the existing spawn() and expose() APIs. Also introduces support to return iterables and async iterables.

Closes #145. Closes #251.

  • Implement callback support
  • Implement iterable & async iterable support
  • Add unit tests
  • Test passing observable to worker
  • Update documentation
  • Check if bundled size can be decreased

@andywer andywer changed the title Callback & iterable support Major refactoring: Callback & iterable support Jun 30, 2020
@kylezimmerman
Copy link

Thanks for the awesome library @andywer, I'm really enjoying using it so far. This PR looks really cool, I'd love to be able to use async iterables.

Is this something your still working on?

@EmmanuelAAM
Copy link

Hi, I was taking a look at one of the issues of the repo and trying to find info about the possibility of using callbacks and I was wondering Is this PR gonna happen? Thanks for the amazing work with threads.js <3

@andywer
Copy link
Owner Author

andywer commented Apr 1, 2022

@EmmanuelAAM Thanks for the kind words! I'm afraid this is on hold as there seemed to be limited interest and I currently don't have extra time to spend on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support (async) generator functions Should we support passing functions to workers?
3 participants