Skip to content

Add the 「run」 directive for the webWorker #209

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

Closed
wants to merge 2 commits into from

Conversation

Airsola
Copy link

@Airsola Airsola commented Jul 31, 2017

thx for such helpful project.
just little change.Add the 「run」 directive for the webWorker~

Add the 「run」 directive for the webWorker
@dinedal
Copy link
Collaborator

dinedal commented Jul 31, 2017

Looks good, can you re-build and commit the updated files?

test local ci
@kaizhu256
Copy link
Member

was the intent of adding run-command to allow passing params in webworkers? if so can we close this as duplicate of #364?

also is run-command concurrency-safe? i did try hacking run-command into workers in the past, and got weird results when posting multiple-messages concurrently. it could've been programming error on my part, but i've stuck to exec since that experience.

@lovasoa
Copy link
Member

lovasoa commented Mar 8, 2020

You can see the commit here. It was not a duplicate of #230
ed9c56f

I'm not sure exactly what you are referring to by run-command.
When you use a webworker, the messages you send are still handled sequentially on a single thread. There is no problem with sending a new message before receiving a response for an old one.

@lovasoa lovasoa closed this Mar 8, 2020
@kaizhu256
Copy link
Member

ok run-directive has different intent and is concurrency-safe. @Airsola, if you still want to contribute, you can submit a new pull-request in vanilla js.

feel free to use commit 632effa as reference, as the feature-set is somewhat similar, including testcase

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.

4 participants