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

Thread running a function that returns a promise is considered unactive #43

Open
magicwheel opened this issue Dec 21, 2014 · 2 comments

Comments

@magicwheel
Copy link

When using a thread to execute a function that returns a promise,
on the function's immediate return the thread is considered to be terminated,
therefore the threads' pool is initializing more parallel threads then it is supposed to :(

Besides, I fail to get the promise returned, it appears as " 'undefined' "

Solution? workaround?

THANKS

@audreyt
Copy link
Owner

audreyt commented Dec 21, 2014

We currently do not support serializing functions and callbacks across threads; tagging as enhancement.

As for workaround, perhaps serializing all state needed for resuming the promise, and continue the promise using message-passing?

@magicwheel
Copy link
Author

Thanks! I'll try that!

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

No branches or pull requests

2 participants