I have two classes and i want one class to be subscribed to the other. So something like this.
Class one:
while(1){
if(true){
//emmit some event
}
Class two:
//wait for class one to emmit some data ,and then start working with the data
My question is, is there any method, module.. that can help me to implemented this behavior?