There are a list of generators gen_list = [gen_1, gen_2, gen_3].
Each gen_x has a logging statement that put a log line in a common logfile.
For example,
gen_1 puts a log line "log 1"
gen_2 puts a log line "log 2"
gen_3 puts a log line "log 3"
After gen_list is executed, the log_file looks like the following.
log 1
log 2
log 3
log 3
log 2
log 1
log 1
log 2
log 3
...
The execution order of generators in the list is alternating. (1, 2, 3, 3, 2, 1, 1, 2, 3, ...)
Is there any way to fix the order always forward-manner? (1, 2, 3, 1, 2, 3, 1, 2, 3, ...)
For example, I want the log_file to be
log 1
log 2
log 3
log 1
log 2
log 3
...