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

core: factor out EsIsolate from Isolate #3613

Merged
merged 5 commits into from Jan 7, 2020

Conversation

bartlomieju
Copy link
Member

This PR factors out all module related stuff from Isolate to new EsIsolate.

Next step would be to refactor core/modules.rs by merging it's structs with EsIsolate


pending_dyn_imports: FuturesUnordered<StreamFuture<IntoStream<DynImport>>>,
dyn_import: Option<Arc<DynImportFn>>,
waker: AtomicWaker,
Copy link
Member

Choose a reason for hiding this comment

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

Was AtomicWaker already part of deno_core::Isolate?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's used in two situations:
a) more ops to poll
b) more dyn imports to poll

Copy link
Member

Choose a reason for hiding this comment

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

This doesn't need to be addressed now but feel like we should avoid tying deno_core to tokio. The AtomicWaker feels like it's unnecessarily growing the abstraction layer of deno_core.

Copy link
Member Author

Choose a reason for hiding this comment

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

AtomicWaker is part of futures crate

core/es_isolate.rs Show resolved Hide resolved
core/es_isolate.rs Show resolved Hide resolved
core/es_isolate.rs Show resolved Hide resolved
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

I think this separation is good.

@bartlomieju
Copy link
Member Author

@ry I'm not sure about the name though 🤔

@ry
Copy link
Member

ry commented Jan 6, 2020

@bartlomieju EsIsolate? I think it's ok.

@bartlomieju
Copy link
Member Author

@bartlomieju EsIsolate? I think it's ok.

Alright 👍

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@95th 95th left a comment

Choose a reason for hiding this comment

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

Some nits please

core/es_isolate.rs Outdated Show resolved Hide resolved
core/es_isolate.rs Outdated Show resolved Hide resolved
core/es_isolate.rs Outdated Show resolved Hide resolved
core/es_isolate.rs Outdated Show resolved Hide resolved
@bartlomieju bartlomieju merged commit ad9fd58 into denoland:master Jan 7, 2020
@bartlomieju bartlomieju deleted the es_modules_isolate branch January 7, 2020 11:46
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.

None yet

3 participants