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

Elevate DenoPermissions lock to top level #3398

Merged
merged 1 commit into from
Nov 24, 2019

Conversation

kevinkassimo
Copy link
Contributor

@kevinkassimo kevinkassimo commented Nov 24, 2019

  • Remove independent per detailed state atomics
  • Wrap DenoPermissions in Arc<Mutex<...>> instead
  • Add argument shared_permissions to allow passing down a Arc<Mutex<DenoPermissions>> to share with another state

This refactoring is to allow cloning permissions easier. The general idea is to separate the below behaviors in the future:

  • Worker copies permissions from global
  • Worker inherit permissions from parent, updating one of which is reflected to another
  • Worker copies permissions from parent, but future updates on either side are not reflected
  • Worker copies partial permissions or no permissions from parent

cc @bartlomieju @afinch7

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

Nice 👍

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 - good cleanup

@ry ry merged commit bca23e6 into denoland:master Nov 24, 2019
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Dec 28, 2019
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