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

Avoid unnecessary copies from movable futures #2928

Open
tclinken opened this issue Apr 8, 2020 · 1 comment
Open

Avoid unnecessary copies from movable futures #2928

tclinken opened this issue Apr 8, 2020 · 1 comment
Assignees
Milestone

Comments

@tclinken
Copy link
Contributor

tclinken commented Apr 8, 2020

The following code shouldn't require copy of the vector:

Future<vector<int>> produceVector(int size) {
  return vector<int>(size, 0);
}

ACTOR Future<Void> driver() {
  vector<int> v = wait(produceVector(1000));
  return Void();
}

However, the above driver does copy the vector.

@etschannen etschannen added this to the 7.0 milestone Apr 8, 2020
@tclinken
Copy link
Contributor Author

There is further discussion of this issue at https://forums.foundationdb.org/t/avoiding-unnecessary-copies-from-movable-futures/

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

No branches or pull requests

2 participants