Skip to content

core: factor out EsIsolate from Isolate#3613

Merged
bartlomieju merged 5 commits into
denoland:masterfrom
bartlomieju:es_modules_isolate
Jan 7, 2020
Merged

core: factor out EsIsolate from Isolate#3613
bartlomieju merged 5 commits into
denoland:masterfrom
bartlomieju:es_modules_isolate

Conversation

@bartlomieju

Copy link
Copy Markdown
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

Comment thread core/es_isolate.rs

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Comment thread core/es_isolate.rs
Comment thread core/es_isolate.rs
Comment thread core/es_isolate.rs

@ry ry left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

@ry

ry commented Jan 6, 2020

Copy link
Copy Markdown
Member

@bartlomieju EsIsolate? I think it's ok.

@bartlomieju

Copy link
Copy Markdown
Member Author

@bartlomieju EsIsolate? I think it's ok.

Alright 👍

@ry ry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@95th 95th left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some nits please

Comment thread core/es_isolate.rs Outdated
Comment thread core/es_isolate.rs Outdated
Comment thread core/es_isolate.rs Outdated
Comment thread core/es_isolate.rs Outdated
@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.

3 participants