Skip to content

Consider passing context for cancelable long-running operations #186

@flwyd

Description

@flwyd

C++ offers S2MemoryTracker for some large operations like S2Builder. This allows clients to set a maximum amount of RAM allocated by an operation and also provides a periodic callback which can trigger an error, e.g. after reaching the deadline of an incoming request.

This second feature is similar to Go's context.Context type. We should consider accepting a Context for operations that a caller might want to cancel if they take too long.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions