> We have to keep that kind of concern in mind when working with
channels.
AFAICS mt.changes is the same channel as machineUnitsChanges, which
there's no reason to close ever IMO (although I see that it is closed in
fact - i'd remove that).
I suggest putting machineUnitsChanges inside the firewaller type, so
this line would be:
case mt.firewaller.machineUnitsChanges <- ...
https:/ /codereview. appspot. com/6374069/ diff/12001/ worker/ firewaller/ firewaller. go firewaller/ firewaller. go (right):
File worker/
https:/ /codereview. appspot. com/6374069/ diff/12001/ worker/ firewaller/ firewaller. go#newcode139 firewaller/ firewaller. go:139: case mt.changes <- ange{mt, change}:
worker/
&machineUnitsCh
On 2012/07/18 13:56:01, niemeyer wrote:
> What happens if mt.changes is closed?
> We have to keep that kind of concern in mind when working with
channels.
AFAICS mt.changes is the same channel as machineUnitsCha nges, which machineUnitsCha nges <- ...
there's no reason to close ever IMO (although I see that it is closed in
fact - i'd remove that).
I suggest putting machineUnitsChanges inside the firewaller type, so
this line would be:
case mt.firewaller.
which makes the mux logic more clear, i think.
https:/ /codereview. appspot. com/6374069/