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

Fallible collections #100

Open
deven96 opened this issue Sep 9, 2024 · 1 comment
Open

Fallible collections #100

deven96 opened this issue Sep 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@deven96
Copy link
Owner

deven96 commented Sep 9, 2024

Vectors, Hashmaps, e.t.c all implicitly fail whenever allocations fail. We are already capping the global allocations using cap, fallible collections would then ensure we don't panic but rather surface the allocation errors

@deven96
Copy link
Owner Author

deven96 commented Sep 30, 2024

It wouldn't be practical or possible to make every datastructure we use fallible, so how about we wrap critical client parts in an std::panic::catch_unwind to ensure that if we ever do massive allocations, we are able to report errors from there back to the client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants