Skip to content

Map multibindings does not support Lazy #1630

@cckroets

Description

@cckroets

Currently Map multibindings can provide:
Map<Key, Value>
Map<Key, Provider<Value>>

I would like it to also provide:
Map<Key, Lazy<Value>>

Right now we use the Provider method. However our map only needs one instance of each Value. If we scope the Value we get one instance. If we leave Values un-scoped we get a new instance every time we access the map. Ideally each Value could be left un-scoped since they contain no state, but now we are creating many new instances of these objects unnecessarily.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions