Skip to content

future: optimize .then() for unique rvalues. #32

@griwes

Description

@griwes

.then() chains are currently suboptimal. Consider:

auto fut = make_ready_future()
    .then(some_callback)
    .then(other_callback)
    .then(yet_another_callback);

Only the result of the final .then() needs to be truly stateful - the temporary ones used to construct this continuation chain are never going to be used except to feed the singular continuation. There's space for optimization here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions