View cleanup: do not use decisionChannel both ways
tock-ibm opened this issue · comments
Yoav Tock commented
the view thread wants to put a decision in the decide channel, and wait until that decision is delivered to the app. the decision is retrieved from the channel by the controller thread.
option 1:
instead of using the decisionChannel both ways, insert in to the channel an object that has a decision and a future in it. the view thread waits on it, the controller thread marks it done.
option 2: use another channel, say decisionDeliveredChannel interface{}, the view thread reads from it, the controller writes to it.
HagarMeir commented