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

Resource table for plugins #3453

Closed
lucacasonato opened this issue Dec 6, 2019 · 2 comments · Fixed by #4834
Closed

Resource table for plugins #3453

lucacasonato opened this issue Dec 6, 2019 · 2 comments · Fixed by #4834

Comments

@lucacasonato
Copy link
Member

I think plugins should be able to use the resource table to some extent. If this is not the case every plugin will need to build their own resource management system, with extra ops to list and close resources. If plugins can just use the builtin resource table, they can just use Deno.close and Deno.resources to close and list resources.

@bartlomieju
Copy link
Member

Yeah, that was done intentionally to not expose anything besides control buffer and zero copy buffer to ops in plugins. It definitely makes sense to give access to ResourceTable but I'd opt to defer it until we split ops into crates - that will require some refactors to ops signatures (probably).

@lucacasonato lucacasonato mentioned this issue Jan 7, 2020
43 tasks
@lucacasonato
Copy link
Member Author

that will require some refactors to ops signatures (probably)

Probably, unless we add a new context.register_stateful_op function (next to context.register_op) with a different op signature. These types of ops would then have access to the resource table and any other state that is exposed to plugins. That way this can be added without breaking compat (if this happens after 1.0).

ry added a commit to ry/deno that referenced this issue Apr 19, 2020
- Removes unnecessary RwLock and Rc around the op registry table
- Preparation to move resource_table to deno_core::Isolate.
- Towards denoland#3453, denoland#4222
ry added a commit that referenced this issue Apr 20, 2020
- Removes unnecessary RwLock and Rc around the op registry table
- Preparation to move resource_table to deno_core::Isolate.
- Towards #3453, #4222
@ry ry closed this as completed in #4834 Apr 21, 2020
SASUKE40 pushed a commit to SASUKE40/deno that referenced this issue May 7, 2020
- Removes unnecessary RwLock and Rc around the op registry table
- Preparation to move resource_table to deno_core::Isolate.
- Towards denoland#3453, denoland#4222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants