I am reading java concurrency in practice. I read one segment which is as follows :
public class ThisEscape {
public ThisEscape (EventSource source) {
source.registerListener(
new EventListener () {
public void onEvent (Event e){
doSomething(e);
}
});
}
}
When the inner event listener instance is published, so is the enclosing ThisEscape instance
Can anyone please help me understand what this exactly means? I am unable to understand this concept.
Page 28
listing 3.7 diagram
section 3.2.1