-
I ran a little experiment and changed all 'static to 'a, and all the tests seemed to pass, also miri didn't complain. For example: pub fn spawn_blocking<'a, F, R>(&self, func: F) -> JoinHandle<R>
where
F: FnOnce() -> R + Send + 'a,
R: Send + 'a,
{
self.inner.blocking_spawner().spawn_blocking(self, func)
} |
Beta Was this translation helpful? Give feedback.
Answered by
Darksonn
Jan 14, 2025
Replies: 1 comment
-
That does not change behavior of any code that compiles today, but it makes it possible to write new code that is wrong but compiles. Please see: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
OneOfOne
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That does not change behavior of any code that compiles today, but it makes it possible to write new code that is wrong but compiles.
Please see:
https://without.boats/blog/the-scoped-task-trilemma/