Skip to content

Support Error state in storages #772

@kvark

Description

@kvark

Is your feature request related to a problem? Please describe.
Gecko and Servo need to be able to tell if something is in an "error" state. wgpu-core doesn't have this ability today, and the suggested workaround (to have "baddie list", described in #638 (comment)) involves a lot of work duplicated on both Servo and Gecko.

Describe the solution you'd like
Throw out vec_map entirely. Instead, have a storage to be basically Vec<Element<T>>, where:

enum Element<T> {
  Vacant,
  Occupied(T, Epoch),
  Error,
}

Describe alternatives you've considered
We considered the baddie list on client side. We also considered storing (T, Epoch, bool) per element.

Additional context
Interestingly, vec_map isn't using anything sophisticated today, it's just Vec<Option<T>> really.
Also, it's in maintenace mode:

WARNING: THIS PROJECT IS IN MAINTENANCE MODE, DUE TO INSUFFICIENT MAINTAINER RESOURCES

In the future, we can also consider building something like that based on hibitset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions