-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
refactor: per-worker resource table #3306
Merged
ry
merged 6 commits into
denoland:master
from
bartlomieju:refactor-state_resource_table
Nov 14, 2019
Merged
refactor: per-worker resource table #3306
ry
merged 6 commits into
denoland:master
from
bartlomieju:refactor-state_resource_table
Nov 14, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bartlomieju
changed the title
[WIP] refactor: per-worker resource table
refactor: per-worker resource table
Nov 9, 2019
CC @ry @piscisaureus |
bartlomieju
force-pushed
the
refactor-state_resource_table
branch
from
November 9, 2019 15:34
afdd567
to
ccb9021
Compare
bartlomieju
force-pushed
the
refactor-state_resource_table
branch
from
November 9, 2019 20:19
ccb9021
to
fe6f23b
Compare
ry
approved these changes
Nov 14, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - this is a great improvement over the global resource table. I'm slightly concerned about the impact on the benchmarks - but let's see what happens. Very nice refactor!
ry
added a commit
to ry/deno
that referenced
this pull request
Nov 14, 2019
This reverts commit fd62379.
ry
added a commit
to ry/deno
that referenced
this pull request
Nov 14, 2019
This patch does not work with the recent bundler changes (denoland#3325). Unfortunately I didn't merge master before landing this patch. It has something to do with console.log not working inside the compiler worker. This reverts commit fd62379.
ry
added a commit
that referenced
this pull request
Nov 14, 2019
bartlomieju
added a commit
to bartlomieju/deno
that referenced
this pull request
Dec 28, 2019
- removes global `RESOURCE_TABLE` - resource tables are now created per `Worker` in `State` - renames `CliResource` to `StreamResource` and moves all logic related to it to `cli/ops/io.rs` - removes `cli/resources.rs` - adds `state` argument to `op_read` and `op_write` and consequently adds `stateful_minimal_op` to `State` - IMPORTANT NOTE: workers don't have access to process stdio - this is caused by fact that dropping worker would close stdout for process (because it's constructed from raw handle, which closes underlying file descriptor on drop)
bartlomieju
pushed a commit
to bartlomieju/deno
that referenced
this pull request
Dec 28, 2019
This patch does not work with the recent bundler changes (denoland#3325). Unfortunately I didn't merge master before landing this patch. It has something to do with console.log not working inside the compiler worker. This reverts commit fd62379.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Blocked by #3290
This PR:
RESOURCE_TABLE
- resource tables are now created perWorker
inState
CliResource
toStreamResource
and moves all logic related to it tocli/ops/io.rs
cli/resources.rs
state
argument toop_read
andop_write
and consequently addsstateful_minimal_op
toState