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

Async effect with Send+Copy set_state! #882

Merged
merged 9 commits into from
Jul 2, 2024
Merged

Async effect with Send+Copy set_state! #882

merged 9 commits into from
Jul 2, 2024

Conversation

namse
Copy link
Contributor

@namse namse commented Jul 1, 2024

Changes

  1. All state must impl Send.
  2. Sig<State> is now Copy and Send.
  3. SetState is now Copy and Send.
  4. New hook, async_effect
  5. Creating namui_hooks::World will make a memory leak because it make a static reference of std::sync::mpsc::Sender. Most of case it would be OK.

@namse namse added the namui This issue is for namui engine label Jul 1, 2024
@namse namse requested a review from bigfoodK July 1, 2024 15:17
@namse namse self-assigned this Jul 1, 2024
@namse namse enabled auto-merge (squash) July 1, 2024 15:45
@namse namse merged commit 387cb27 into master Jul 2, 2024
32 checks passed
@namse namse deleted the namui/async-effect branch July 2, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
namui This issue is for namui engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants