Skip to content

Placement protocol should allow failure in place creation. #1315

Closed
@rphmeier

Description

@rphmeier

The only way to indicate failure in in-place allocation is to have your InPlace implementer return a Result from finalize(). However, most failures in in-place allocation will occur when there is insufficient space in the Placer to make a place. The implementation of Placer for ExchangeHeapSingleton in std sidesteps this issue by panicking when there isn't sufficient heap space, but that is hardly an acceptable solution for every implementation of in-place allocation.

Error handling for in-place allocation could become a little weird if every allocation can fail unexpectedly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions