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

Wrapped the update processing of AsyncSignal.value in a batch #219

Merged
merged 1 commit into from Mar 27, 2024

Conversation

rizumita
Copy link
Contributor

When AsyncSignal.value is updated, the value propagates to the monitoring side while the state of _completer is not synchronized, so it has been fixed to ensure that the state of _completer is synchronized.
By synchronizing, when AsyncData flows to subscribe, isCompleted simultaneously becomes true.

When AsyncSignal.value is updated, the value propagates to the monitoring side while the state of _completer is not synchronized, so it has been fixed to ensure that the state of _completer is synchronized.
Copy link
Owner

@rodydavis rodydavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rodydavis
Copy link
Owner

That's a great use of the batch!

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.67%. Comparing base (dd1d3f4) to head (1bb7243).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   58.56%   58.67%   +0.11%     
==========================================
  Files          33       33              
  Lines        1419     1423       +4     
==========================================
+ Hits          831      835       +4     
  Misses        588      588              
Files Coverage Δ
packages/signals_core/lib/src/async/signal.dart 100.00% <100.00%> (ø)

@rodydavis rodydavis merged commit 12359e8 into rodydavis:main Mar 27, 2024
3 of 4 checks passed
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.

None yet

2 participants