-
Notifications
You must be signed in to change notification settings - Fork 3
Chain experiments #8
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
base: main
Are you sure you want to change the base?
Chain experiments #8
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. |
|
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 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.