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

WIP. Lifetime #378

Closed
wants to merge 1 commit into from
Closed

WIP. Lifetime #378

wants to merge 1 commit into from

Conversation

andy128k
Copy link
Contributor

Related to #299

@Keats
Copy link
Owner

Keats commented Jan 14, 2019

Thanks, I'll try it!
It is a bit worse in terms of ergonomics but if it works, it is a huuuge perf win compared to the current state.

@Keats
Copy link
Owner

Keats commented Jan 15, 2019

I had a quick look in a flight yesterday but I don't think this will work. Rather than a reference, the functions need to have a lifetime bound other than `'static'. Afaik, the test passes because they share the scope

@Keats
Copy link
Owner

Keats commented Jan 17, 2019

Made a branch with an example that would ideally work: https://github.com/Keats/tera/blob/lifetime-issue/examples/borrowed_trait_context/main.rs

I have to say I'm not even sure it's doable

@Keats
Copy link
Owner

Keats commented Jan 21, 2019

@Keats
Copy link
Owner

Keats commented Jan 28, 2019

In the end, Arc<RwLock<_>> does the job, no need for lifetimes

@Keats Keats closed this Jan 28, 2019
@andy128k andy128k deleted the lifetime branch January 28, 2019 14: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.

2 participants