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

Use a thread pool for async FS ops #733

Closed
ry opened this issue Sep 12, 2018 · 3 comments
Closed

Use a thread pool for async FS ops #733

ry opened this issue Sep 12, 2018 · 3 comments
Labels
bug Something isn't working correctly
Milestone

Comments

@ry
Copy link
Member

ry commented Sep 12, 2018

As noted as a TODO item in 0d03faf, the current way we're implementing async FS ops is still blocking. We have to call tokio_threadpool::blocking like tokio-fs does.
Example: https://github.com/tokio-rs/tokio/blob/0f44adf5f696ac73dcdcb1fb2b91b87553c57443/tokio-fs/src/rename.rs#L52

Fixing this should not involve touching JS code.

@ry ry added the bug Something isn't working correctly label Sep 12, 2018
@ry ry added this to the v0.2 milestone Sep 12, 2018
@sijad
Copy link
Contributor

sijad commented Sep 13, 2018

is there any reason that we can't use tokio-fs itself?

@ry ry mentioned this issue Sep 21, 2018
ry added a commit to ry/deno that referenced this issue Sep 22, 2018
This makes all of the ops thread safe.

Now Deno is multithreaded.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 22, 2018
This makes all of the ops thread safe.

Now Deno is multithreaded.

Preliminary work for denoland#733.
@ry
Copy link
Member Author

ry commented Sep 22, 2018

@sijad Once #782 lands we'll be able to use tokio-fs

ry added a commit to ry/deno that referenced this issue Sep 22, 2018
This makes all of the ops thread safe.

Now Deno is multithreaded.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 22, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 22, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 22, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 22, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 22, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 22, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 24, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 24, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 24, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 24, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 25, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Adds libdeno to JS globals to make for easier testing.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 25, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Adds libdeno to JS globals to make for easier testing.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 25, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Adds libdeno to JS globals to make for easier testing.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 25, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Adds libdeno to JS globals to make for easier testing.

Preliminary work for denoland#733.
ry added a commit to ry/deno that referenced this issue Sep 25, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Adds libdeno to JS globals to make for easier testing.

Preliminary work for denoland#733.
ry added a commit that referenced this issue Sep 25, 2018
By using the tokio default runtime.

This patch makes all of the ops thread safe.

Adds libdeno to JS globals to make for easier testing.

Preliminary work for #733.
@ry
Copy link
Member Author

ry commented Oct 11, 2018

Fixed in df09fba

@ry ry closed this as completed Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants