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

hpx::util::unwrapped doesn't work with non-future types #1400

Closed
sithhell opened this issue Mar 9, 2015 · 2 comments
Closed

hpx::util::unwrapped doesn't work with non-future types #1400

sithhell opened this issue Mar 9, 2015 · 2 comments

Comments

@sithhell
Copy link
Member

sithhell commented Mar 9, 2015

Making an unwrapped call in dataflow when one of the arguments isn't a future, we currently get a compile error.
Example:

void f(int i, int i) {}
void f2(int i, hpx::future<int> i) {}

// Fails:
hpx::lcos::local::dataflow(
    hpx::util::unwrapped(f), 8, hpx::make_ready_future(9)); 
// Succeeds:
hpx::lcos::local::dataflow(
    hpx::util::unwrapped(f), hpx::make_ready_future(8), hpx::make_ready_future(9)); 

// Succeeds:
hpx::lcos::local::dataflow(
    f2, 8, hpx::make_ready_future(9)); 

IMHO, all three examples above should work.

@AntonBikineev
Copy link
Contributor

We just ran into this with Zahra. Would it be correct for non-future params to just wrap them into futures with make_ready_future underneath?

@hkaiser
Copy link
Member

hkaiser commented May 11, 2015

We just ran into this with Zahra. Would it be correct for non-future params to just wrap them into futures with make_ready_future underneath?

I'd rather pass through non-future parameters unchanged, if possible.

@hkaiser hkaiser modified the milestones: 0.9.11, 0.9.12 Nov 12, 2015
@hkaiser hkaiser modified the milestones: 0.9.99, 1.0.0 Jun 27, 2016
@hkaiser hkaiser modified the milestones: 1.0.0, 1.1.0 Apr 23, 2017
Naios added a commit to Naios/hpx that referenced this issue Jul 24, 2017
* Use hpx::util::unwrap and hpx::util::unwrapping instead,
  that clearify which underlying implementation should
  be used (the immediate or the deferred one).
  The automatic implementation selection was broken since
  unwrapped allowed to pass non future arguments through.
* Closes STEllAR-GROUP#1400
* Closes STEllAR-GROUP#1404
* Closes STEllAR-GROUP#2456
* Ref STEllAR-GROUP#1126
* Ref STEllAR-GROUP#1132
Naios added a commit to Naios/hpx that referenced this issue Jul 24, 2017
* Use hpx::util::unwrap and hpx::util::unwrapping instead,
  that clearify which underlying implementation should
  be used (the immediate or the deferred one).
  The automatic implementation selection was broken since
  unwrapped allowed to pass non future arguments through.
* Closes STEllAR-GROUP#1400
* Closes STEllAR-GROUP#1404
* Closes STEllAR-GROUP#2456
* Ref STEllAR-GROUP#1126
* Ref STEllAR-GROUP#1132
Naios added a commit to Naios/hpx that referenced this issue Jul 25, 2017
* Use hpx::util::unwrap and hpx::util::unwrapping instead,
  that clearify which underlying implementation should
  be used (the immediate or the deferred one).
  The automatic implementation selection was broken since
  unwrapped allowed to pass non future arguments through.
* Closes STEllAR-GROUP#1400
* Closes STEllAR-GROUP#1404
* Closes STEllAR-GROUP#2456
* Ref STEllAR-GROUP#1126
* Ref STEllAR-GROUP#1132
Naios added a commit to Naios/hpx that referenced this issue Jul 25, 2017
* Use hpx::util::unwrap and hpx::util::unwrapping instead,
  that clearify which underlying implementation should
  be used (the immediate or the deferred one).
  The automatic implementation selection was broken since
  unwrapped allowed to pass non future arguments through.
* Closes STEllAR-GROUP#1400
* Closes STEllAR-GROUP#1404
* Closes STEllAR-GROUP#2456
* Ref STEllAR-GROUP#1126
* Ref STEllAR-GROUP#1132
Naios added a commit to Naios/hpx that referenced this issue Jul 25, 2017
* Use hpx::util::unwrap and hpx::util::unwrapping instead,
  that clearify which underlying implementation should
  be used (the immediate or the deferred one).
  The automatic implementation selection was broken since
  unwrapped allowed to pass non future arguments through.
* Closes STEllAR-GROUP#1400
* Closes STEllAR-GROUP#1404
* Closes STEllAR-GROUP#2456
* Ref STEllAR-GROUP#1126
* Ref STEllAR-GROUP#1132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants