Open
Conversation
* silence shadowing because that happens a lot in future.hpp * mark variables as maybe_unused because msvc complains in unused case of constexpr branch * enable __cplusplus makro for msvc because it is used inside the future library but not enabled by default
version fails to compile with CMake 4.x
of arguments can be used and it returns the correct result. Save interim state Next interim
* chain of arbitrary callables * cancellation token
Move pre_exit() into main to avoid runtime issues of double call Cleanup template code by using lambda with explicit type names
|
If the intention is that this PR be reviewed, it should be broken up into separate PRs each with its own concern. |
Member
Author
|
Not really. This PR is more about exchanging ideas in the context of chains. When it comes to the point that something should actually be merged into main then of course everything needs to be split up into smaller portions and targeting the correct files. |
5ae1c8f to
5a0abab
Compare
5a0abab to
7b48799
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my current state of experiments:
split. Hereby I added two approaches:start()of the fanned out chains triggers the upstream chain and every further argument to an otherstart()will be ignored.start()of the fanned out chain picks up that value while preserving the type information that is normally passed into withstart(). I could think of an alternative or additional approach of passing in a function that returns that value on calling the first timestart().pre_exit()into an extramain.cppto prevent runtime problems of calling it multiple times which happens in the current setup of the catch2 tests.The biggest change of the existing code is that I changed the passed in receiver into a shared_ptr object to circumvent the problem of the move-only
package_task.Adenum: I tried to make the receiver in
start()a value - remove the shared_ptr - keep in the captured lambda and pass from then only a reference, akareceiver_ref<>around. But this does not work, because the lambda inside the tuple will be copied into the invoke. This is not possible because of the removed copy-ctor ofpackage_task.I don't like the heap allocation, but I don't see at the moment a way around it.