Skip to content

Avoid unnecessary copies from movable futures #2928

Open
@tclinken

Description

@tclinken

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions