Circular dependency with constructor injection
问题 Say I have the following components: Producer produces numbers and sends messages to Consumer Both Producer and Consumer send messages to Monitor Monitor, say randomly, decides when the produce / consume process should stop and sends a message to Stopper Stopper then stops both Producer and Consumer cleanly I know this is easy to accomplish in a mutable language such as Java. I know also this can be resolved by allowing partial mutability with interfaces, such as described here. However, it's