StreamSignal.dispose()
(and FutureSignal
) throws SignalsWriteAfterDisposeError
#171
Labels
bug
Something isn't working
Test:
This happens because
dispose()
callsreset()
, which in turn callsAsyncSignal.reset()
, which then callsset value
, which notices the signal has already been disposed.The simplest fix is to move
super.dispose()
to be the last operation indispose()
, since conceptually deinitialization should be done in reverse order of initialization. But I'm a bit worried the library is doing too much during disposal. For example, the last step ofreset()
is to set_initialized
to true, which doesn't make sense in a disposed object.The text was updated successfully, but these errors were encountered: