Closed
Description
The code below throws an exception (including a typo): "Unhandled Exception: Bad state: There are still other objects waiting for this instance so signal ready"
Since it's unpractical to guarantee the order in which calls to isReady / signalReady are executed when instances are distributed over the entire project, maybe the objectsWaiting.add(...)
calls should be ignored after an instance already signaled to be ready once?
class X {}
void main() async {
var x = X();
GetIt.I.registerSingleton(x, signalsReady: true);
GetIt.I.signalReady(x);
await GetIt.I.isReady<X>();
GetIt.I.unregister<X>();
}
Metadata
Metadata
Assignees
Labels
No labels