[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [master 03/15] Throw away the dispatcher 'skipList' and give Step a state.



----- Original Message -----
> In particular, 'scheduled' will run if not explicitly skipped,
> 'skipped'
> means 'is never going to be run' and 'requested' means 'will run and
> can
> not be skipped'.
> ---

> -
> class Step(object):
> + SCHED_UNSCHEDULED = 0
> + SCHED_SCHEDULED = 1 # will execute if not explicitly skipped
> + SCHED_SKIPPED = 2 # is never going to execute
> + SCHED_REQUESTED = 3 # will execute and can not be skipped
> + SCHED_DONE = 4 # done is a final state
> +
> + sched_state_machine = [
> + # unscheduled # scheduled # skipped # requested # done
> + [SCHED_UNSCHEDULED, SCHED_SCHEDULED, SCHED_SKIPPED, SCHED_REQUESTED,
> SCHED_DONE], # unscheduled
> + [None , SCHED_SCHEDULED, SCHED_SKIPPED, SCHED_REQUESTED,
> SCHED_DONE], # scheduled
> + [None , None , SCHED_SKIPPED, None , None], # skipped
> + [None , None , None , SCHED_REQUESTED, SCHED_DONE], # requested
> + [None , None , None , None , SCHED_DONE]] # done
> +

This really deserves much better documentation. If it specifies the matrix of allowed transitions, is column or row the starting point? Why didn't you use True/False (or True/0 to make it more visible) to mark the valid transition edges, or is there any meaning in the transition value?

--
Martin Sivák
msivak redhat com
Red Hat Czech
Anaconda team / Brno, CZ


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]