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

[WIP] WebWorker implementation. #1331

Closed
wants to merge 3 commits into from
Closed

[WIP] WebWorker implementation. #1331

wants to merge 3 commits into from

Conversation

ry
Copy link
Member

@ry ry commented Dec 12, 2018

Only accessible from Rust currently.

This is part of the effort to get native ES modules #975

@ry ry mentioned this pull request Dec 12, 2018
@ry ry changed the title Basic WebWorker implementation. [WIP] WebWorker implementation. Dec 12, 2018
@ry ry force-pushed the workers branch 2 times, most recently from 16559d6 to 95c6b40 Compare December 12, 2018 17:26
Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thinking too, IIRC, TypeScript can load itself into a web worker to increase its performance. I think that is to help it be non-blocking in a browser, but there might be other aspects as well. It is worth researching a bit more to see if we can further improve the compilers performance.

@@ -71,3 +72,8 @@ window.TextEncoder = textEncoding.TextEncoder;
export type TextEncoder = textEncoding.TextEncoder;
window.TextDecoder = textEncoding.TextDecoder;
export type TextDecoder = textEncoding.TextDecoder;

window.workerMain = workers.workerMain;
// TODO These shouldn't be available in main isolate.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will have to create a seperate global module for the compiler isolate when we get there. There is clearly a lot of stuff that isn't necessary in order to support just the compiler.

@F001
Copy link
Contributor

F001 commented Dec 13, 2018

I have no idea why introduce another pair of channels worker_channels, since Isolate has already contains a channel, and the event loop is based on it. I prefer to reuse the existing channels.
That be said, I'm not against on this PR. I'm just considering whether it is possible to avoid Mutex here.

ry added 3 commits January 3, 2019 20:45
This reverts commit e976b3e.

There is nothing technically wrong with this commit, but it's adding
complexity to a big refactor (native ES modules denoland#975). Since it's not
necessary and simply a philosophical preference, I will revert for now
and try to bring it back later.
Only accessible from Rust currently.

fixes

wip

wip

test_rs passes

fucking works
@ry
Copy link
Member Author

ry commented Jan 4, 2019

this code is included in #1460

@ry ry closed this Jan 4, 2019
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.

3 participants