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

remove more calls to futures::executor::block_on #4775

Merged
merged 4 commits into from
Apr 16, 2020

Conversation

bartlomieju
Copy link
Member

  • workers test - used #[tokio::test] instead
  • cloning files for process - used std_file_resource helper
  • set_raw - used raw handles/fds

@bartlomieju bartlomieju requested a review from ry April 16, 2020 12:15
@bartlomieju bartlomieju mentioned this pull request Apr 16, 2020
std_file_resource(&mut state.resource_table, rid, move |r| match r {
Ok(std_file) => std_file.try_clone().map_err(OpError::from),
Err(_) => Err(OpError::bad_resource_id()),
})
}
Copy link
Member

Choose a reason for hiding this comment

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

If one clones a file, should there be a new entry in the resource table?

Copy link
Member Author

Choose a reason for hiding this comment

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

No - it's same underlying file - we clone just because of API contract that requires Into<Stdio> which requires owned file.

Copy link
Member

Choose a reason for hiding this comment

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

Hm. I'm not sure about this, but this is probably better than before. Let's land it for now and I'll revisit later.

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

@bartlomieju bartlomieju merged commit 0c48470 into denoland:master Apr 16, 2020
@bartlomieju bartlomieju deleted the remove_more_block_on branch April 16, 2020 14:29
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.

2 participants