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

[breaking] Loosen Sync requirements #15

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

Tamschi
Copy link
Contributor

@Tamschi Tamschi commented Jan 8, 2021

Thanks for making this crate! It's exactly what I need for my web framework project.

However, I'm hitting a few snags related to Sync bounds on various methods, which aren't necessary with appropriate constraints on this type's unsafe impl Sync. This pull request removes them where possible and as such closes #10.

Note that this is unrelated to #9, which I'll make a separate pull request for in a moment.

As `Send` and `Sync` already control access to `LazyTransform` enough to ensure soundness, there is no need to require it on most methods. This change also enables much more versatile use of lazy-init in less-threaded applications.
@khuey
Copy link
Owner

khuey commented Jan 12, 2021

Thanks!

@khuey khuey merged commit 2bf6f23 into khuey:master Jan 12, 2021
@Tamschi Tamschi deleted the loosen-sync-requirements branch January 12, 2021 22:07
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.

Why are things required to be Sync?
2 participants