Open ericniebler opened 1 month ago
I don't think that the proposed resolution is sufficient as this doesn't prevent the case where run() has previously been called and has returned.
Assuming we want to preserve this restriction (i.e. you can only call run() once), we probably want to instead:
pop-front()
method to transition the state to "finished" if it detects that the state is "finishing" and the count is zero.
problem
the precondition on
run_loop::run()
is that the state is starting. given thatrun_loop::finish()
puts the loop in the finishing state, the implication is that one cannot callfinish()
before callingrun()
.However, in most cases
sync_wait
is callingfinish()
on itsrun_loop
before callingrun()
, violating this precondition.sync_wait
does the following:if
sndr
completes synchronously, thesync_wait_receiver
will callfinish()
on theloop
beforeloop.run()
is called, violatingrun
's precondition.proposed resolution
the precondition on
run_loop::run
should be: