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

Make RuntimeGuard public #1467

Merged
merged 4 commits into from
Sep 19, 2023
Merged

Conversation

ealmloff
Copy link
Member

This is a different approach to #1441 that just makes the runtime guard public. This API is slightly more complex because it uses drop handlers, but can be more flexible

Closes #1465

@ealmloff ealmloff added the core relating to the core implementation of the virtualdom label Sep 17, 2023
@jkelleyrtp
Copy link
Member

I don't see a drop handler here?

@ealmloff
Copy link
Member Author

ealmloff commented Sep 18, 2023

I don't see a drop handler here?

That isn't added in this PR. This PR just makes it public. In

pop_runtime();
:

impl Drop for RuntimeGuard {
    fn drop(&mut self) {
        pop_runtime();
    }
}

@jkelleyrtp jkelleyrtp merged commit 27a551d into DioxusLabs:master Sep 19, 2023
@ealmloff ealmloff deleted the expose-runtime-gaurd branch September 19, 2023 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core relating to the core implementation of the virtualdom
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We should not expose global runtime manipulation.
2 participants