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

Iter when T: Sync #19

Closed
Kestrer opened this issue Nov 12, 2020 · 2 comments
Closed

Iter when T: Sync #19

Kestrer opened this issue Nov 12, 2020 · 2 comments

Comments

@Kestrer
Copy link
Contributor

Kestrer commented Nov 12, 2020

Would it be possible to add a method that iterates over shared references to each thread's value when T: Sync?

@Amanieu
Copy link
Owner

Amanieu commented Nov 12, 2020

This isn't possible because this would race with other threads adding new values, even if they are Sync.

@Kestrer
Copy link
Contributor Author

Kestrer commented Nov 13, 2020

Ok, makes sense.

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