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

Add basic futures to observe dispatch of actions and effects #128

Merged
merged 8 commits into from
Feb 21, 2022

Conversation

arximboldi
Copy link
Owner

@arximboldi arximboldi commented Jan 10, 2022

This PR addresses #89 and potentially #96.

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2022

Codecov Report

Merging #128 (719e744) into master (5df6dab) will increase coverage by 0.10%.
The diff coverage is 98.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #128      +/-   ##
==========================================
+ Coverage   94.94%   95.04%   +0.10%     
==========================================
  Files          73       76       +3     
  Lines        2649     2747      +98     
==========================================
+ Hits         2515     2611      +96     
- Misses        134      136       +2     
Impacted Files Coverage Δ
lager/debug/debugger.hpp 47.61% <ø> (+0.84%) ⬆️
lager/future.hpp 88.88% <88.88%> (ø)
lager/context.hpp 89.28% <100.00%> (-4.47%) ⬇️
lager/effect.hpp 100.00% <100.00%> (ø)
lager/store.hpp 98.61% <100.00%> (+0.39%) ⬆️
test/core.cpp 98.97% <100.00%> (+0.01%) ⬆️
test/futures.cpp 100.00% <100.00%> (ø)
test/sensor.cpp 100.00% <100.00%> (ø)
test/setter.cpp 100.00% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5df6dab...719e744. Read the comment docs.

@arximboldi
Copy link
Owner Author

Merging this now.

In a private repo, @isherman has shown that enabling futures can have a performance penalty per-dispatch. The penalty is small enough that it is probably ok for most projects, but it is still worth having it optional. So to enable it, you need to pass the lager::with_futures enhancer to the make_store call. In the future I am gonna explore other designs that either remove the performance penalty or make it optional per dispatch() instead of per store.

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