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

op to give number of open "resources" #1117

Closed
ry opened this issue Oct 29, 2018 · 2 comments
Closed

op to give number of open "resources" #1117

ry opened this issue Oct 29, 2018 · 2 comments

Comments

@ry
Copy link
Member

ry commented Oct 29, 2018

Resources (AKA rid) are Deno's version of file descriptors. They are integer values used to refer to open files, sockets, and other concepts. For testing it would be good to be able to query the system for how many open resources there are.

The table that holds them is here:

static ref RESOURCE_TABLE: Mutex<ResourceTable> = Mutex::new({

Maybe call this deno.numResources()

Alternatively we could have deno.resources() which returns a list of different open resources and their ids. It might look like this [ [0, "stdin"], [1, "stdout"], [2, "stderr"], [7, "httpBody"] ]

@ry ry changed the title Wanted: op to give number of open "resources" op to give number of open "resources" Oct 29, 2018
@bartlomieju
Copy link
Member

I'll do it

@bartlomieju bartlomieju mentioned this issue Oct 30, 2018
2 tasks
@ry
Copy link
Member Author

ry commented Oct 30, 2018

landed in 946acbc

@ry ry closed this as completed Oct 30, 2018
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

No branches or pull requests

2 participants