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

Some refactoring #160

Merged
merged 8 commits into from Apr 2, 2022
Merged

Some refactoring #160

merged 8 commits into from Apr 2, 2022

Conversation

MBkkt
Copy link
Member

@MBkkt MBkkt commented Mar 20, 2022

Purpose

  • Improve CI
  • Add new MakeFuture implementation and tests for it
  • Add AtomicEvent also, make Event based Wait*
  • Add yaclib/config.hpp to all files
  • Small refactoring
    • Fix CMake config
    • yaclib instead of ${PROJECT_NAME}
  • Then refactor:
    • Reduce duplication
    • Make Result better
    • Use reference instead of pointer for inline_core
  • Fix compile error: we should use std namespace for typedefs that included by
  • Fix tests

Related Information

Testing

  • This change is a trivial rework or code cleanup without any test coverage.
  • This change is already covered by existing tests.
  • This PR adds tests that were used to verify all changes.
  • There are tests in an external testing repository: ...

@MBkkt MBkkt requested a review from kononovk as a code owner March 20, 2022 18:25

using atomic_intptr_t = atomic<intptr_t>;
using atomic_uintptr_t = atomic<uintptr_t>;
using atomic_size_t = atomic<size_t>;
Copy link
Member Author

Choose a reason for hiding this comment

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

g++ (GCC) 11.2.0
libstdc++: 20210728

Doesn't compile :(

So we always should use std:: :(

@MBkkt MBkkt force-pushed the mbkkt/then-refactor branch 3 times, most recently from a5383a2 to 8d8bb7a Compare March 26, 2022 02:11
@MBkkt MBkkt requested a review from myannyax as a code owner March 26, 2022 02:11
@MBkkt MBkkt force-pushed the mbkkt/then-refactor branch 3 times, most recently from d9be31d to 04964b9 Compare March 26, 2022 05:06
@MBkkt MBkkt force-pushed the mbkkt/then-refactor branch 2 times, most recently from 14102a6 to 9d161b0 Compare April 2, 2022 14:58
@codecov
Copy link

codecov bot commented Apr 2, 2022

Codecov Report

Merging #160 (96a55e4) into main (8badef7) will decrease coverage by 0.64%.
The diff coverage is 95.93%.

❗ Current head 96a55e4 differs from pull request most recent head fad831f. Consider uploading reports for the commit fad831f to get more accurate results

@@             Coverage Diff             @@
##              main     #160      +/-   ##
===========================================
- Coverage   100.00%   99.35%   -0.65%     
===========================================
  Files           48       50       +2     
  Lines         1051     1083      +32     
===========================================
+ Hits          1051     1076      +25     
- Misses           0        7       +7     
Impacted Files Coverage Δ
include/yaclib/algo/wait_group.hpp 100.00% <ø> (ø)
include/yaclib/algo/when_all.hpp 100.00% <ø> (ø)
include/yaclib/algo/when_any.hpp 100.00% <ø> (ø)
include/yaclib/async/contract.hpp 100.00% <ø> (ø)
include/yaclib/async/promise.hpp 100.00% <ø> (ø)
include/yaclib/coroutine/await.hpp 100.00% <ø> (ø)
...lude/yaclib/coroutine/detail/coroutine_deleter.hpp 100.00% <ø> (ø)
include/yaclib/coroutine/detail/future_awaiter.hpp 100.00% <ø> (ø)
include/yaclib/coroutine/detail/promise_type.hpp 100.00% <ø> (ø)
include/yaclib/executor/detail/unique_task.hpp 100.00% <ø> (ø)
... and 49 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@MBkkt MBkkt force-pushed the mbkkt/then-refactor branch 8 times, most recently from 91069e9 to e1f07f9 Compare April 2, 2022 17:25
@MBkkt MBkkt changed the title SHIT Some refactoring Apr 2, 2022
@MBkkt MBkkt added enhancement New feature performance Improve performance refactoring Refactoring labels Apr 2, 2022
@MBkkt MBkkt self-assigned this Apr 2, 2022
* Reduce duplication
* Make Result better
* Use reference instead of pointer for inline_core
@MBkkt MBkkt assigned MBkkt and unassigned MBkkt Apr 2, 2022
src/algo/wait_impl.cpp Show resolved Hide resolved
include/yaclib/util/detail/event_deleter.hpp Show resolved Hide resolved
@@ -0,0 +1,89 @@
#include <util/error_code.hpp>
Copy link
Member Author

Choose a reason for hiding this comment

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

Need to add test: make future with exception, error, stop tag

include/yaclib/algo/detail/wait_impl.hpp Show resolved Hide resolved
@MBkkt MBkkt merged commit af2e09c into main Apr 2, 2022
@MBkkt MBkkt deleted the mbkkt/then-refactor branch August 6, 2022 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature performance Improve performance refactoring Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant