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

Added status msg from the worker function (param.fn) to a callback function (param.fn). #9

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

Conversation

gaugustin
Copy link

I added an ability to send status msg from the worker function (param.fn) to a callback function (param.onmsg). I also added support for AMD module / Node module / browser or worker variable.

var param = {
fn: // <-- function to run in a thread;
args: // <-- function's arguments;
cb: // <-- callback function for fn terminated; can be anonymous
onmsg: // <-- callback function for "self.postMessage({ msg: });" out of fn
};

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.

1 participant