Skip to content

Conversation

@Levyks
Copy link

@Levyks Levyks commented May 24, 2025

Solves #11

I don't thinks this is possible without unsafe, but since the crate already uses it elsewhere, I think it's fine!?!

The performance of this will be poor, but I think it's still better than not giving access to the items at all.

@willothy
Copy link
Owner

Thanks for the PR! At a glance I'm concerned by the fact that we have to get read locks on all shards at once. Since the method is async anyways, maybe it would be better to use the Stream API and have each iteration return a future? That way we can still have concurrent writes to shards that aren't actively being iterated over.

@Levyks
Copy link
Author

Levyks commented May 27, 2025

Thanks for the PR! At a glance I'm concerned by the fact that we have to get read locks on all shards at once. Since the method is async anyways, maybe it would be better to use the Stream API and have each iteration return a future? That way we can still have concurrent writes to shards that aren't actively being iterated over.

Yeah, that was one option that I considered, I haven't had the time yet this week, but I will implement a stream iterable as soon as possible

@willothy
Copy link
Owner

Thank you, I appreciate it! No rush :)

@miaomiaowu0428
Copy link

hi! I found that entry and iter APIs are impl-ed already buy not merged. I wonder what happend and can I use these unmerged features anyway?

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.

3 participants