Synchronizing threads across different modules

So I have two modules let's call them m1 and m2. So m1 depends on m2 and m1 starts a Thread that does some things using m2, the problem is that I need the thread in m1 and the thread in m2 to exchange information from time to time and for that I would need m2 to also depend on m1 but that creates a circular dependency and as far as I'm aware that's bad (correct me if I am wrong). How should I avoid this? Should I make another module which m1 and m2 depend on and that module handles synchronization and and everything across m1 and m2 or does that just lead to the same problem with extra steps?
Was this page helpful?